For more info about manifest goto here : http://docs.oracle.com/javase/tutorial/deployment/jar/defman.html
Manifest-Version: 1.0 Class-Path: . file:///C:/Program%20Files%20(x86)/Java/jdk1.7.0_09/jre/lib/jfxrt.jar Main-Class: test.HelloWorld
Using either of one of above approach can execute the jar file containing javafx class
Syntax: java -cp "current path;path of your jfxrt" -jar JarfileName.jar Example: java -cp ".;C:\Program Files (x86)\Java\jdk1.7.0_09\jre\lib\jfxrt.jar" Test.jar
I don't know what the jar api mean. Do you mean this api ? http://docs.oracle.com/javase/1.4.2/docs/api/java/util/jar/package-summary.html
Why do you use JDK 7 (and not 6) for JFX applications?In addition to Narayan's reasons:
The last publicly available release of Oracle JDK 6 is to be released in February, 2013. This means that after 19 February 2013, all new security updates, patches and fixes for Java SE 6 and Java SE 5 will only be available through My Oracle Support and will thus require a commercial license with Oracle.https://blogs.oracle.com/java/entry/end_of_public_updates_for
1. Class-Path entries cannot be absolute.Correct. That's what the specification says.
Now I can use obsulute paths by prefixing them with "file:///C:/"If that really works, it is a bug and not to be relied on. Stick to what it says in the specification.
2. Class-Path entries cannot include spaces.Correct. Class-path entries are URLs, and URLs cannot contain spaces.
Now I can use spaces by using "%20" to make a space.Correct. That is the defined encoding for space in a URL.
You proved that I was wrong about those two issues. Thank you.No he didn't. He found what appears to be a bug. Don't rely on it being there next release.
EJP wrote:Hi EJP,
More probably, you don't have to put that JAR file on the Class-path at all because of where it is, so the absolute entry in the Class-path doesn't work but it doesn't have to.
Manifest-Version: 1.0 JavaFX-Version: 2.2 JavaFX-Application-Class: test.HelloWorld Main-Class: com/javafx/main/Main /*this is always same non changable*/
Re your previous guess, the JAR File Specification says this: "Class-Path: The value of this attribute specifies the *+relative+* [my emphasis] URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path."