Hugo Guerrero
Hugo Guerrero

Reputation: 91

javafx deployment using java 6

I just package my JavaFX app using the provided tool. But when I try to run it using java -jar app.jar I get a message asking me to install a newer Java version. I'm using 6u33 withfx 2.2beta` in development environment and is running fine. So, my question is, what is the required config to run under Java 6?

Here is my package command:

\javafx-sdk2.2.0-beta\bin\javafxpackager.exe -createjar -appClass gui.principal.FrmPrincipal -classpath lib\jfxrt.jar;lib\antlr-2.7.7.jar;lib\dom4j-1.6.1.jar;lib\hibernate-commons-annotations-4.0.1.Final.jar;lib\hibernate-core-4.1.4.Final.jar -srcdir classes -outdir dist -outfile Etransporte.jar -V

Thanks!

Upvotes: 2

Views: 1687

Answers (2)

jewelsea
jewelsea

Reputation: 159291

No need to use the beta sdk, use the production sdk. The beta sdk may have unresolved bugs and is not suitable for packaging applications for general deployment.

Just some general info, I think you probably have most of this covered already, but something might be useful.

Here is a sample batch script for packaging a javafx application with javafxpackager.exe. Offhand the command you are running looks fine.

Ensure that the java system and javafx installation on your test machine are both the same bit architectures (e.g. 32bit or 64bit). Also jre6+javafx2.2 is only supported on Windows machines, not Linux or Mac.

Note that if your client machine only has jre 6 installed and not the JavaFX runtime, then it is expected when you run your packaged app on that system that it will provide some prompt and help to allow the user to install the JavaFX runtime on the client.

Also note, that not all versions of jre6 are supported by JavaFX 2.2, it must be a recent version of jre6 (2.2 requires Java SE 6 Update 33). It does seem that you are running the right minimum version.

Upvotes: 0

Hugo Guerrero
Hugo Guerrero

Reputation: 91

Well, a couple of hours later I downloaded the final version of JavaFX SDK and installed it over my Java 6u33 SDK and everything worked fine since then. So, upgrade is the rule.

Upvotes: 3

Related Questions