0

I have a problem with getting the Application to run on other People's machines.

I have tested a self contained and the normal .jar file. When i pass them to a friend of mine who has java installed, when he opens the .jar file, there is an Error: "Java Exception has occured".

When i run both the .jar and the .exe off the self contained one, both do work on my PC.

So the actual question is: Why isn't it working just like that?

Can't i just run JavaFX applications without installing the whole JDK?

Thanks for your help :)

  • Can you provide any additional info? – Kao Aug 27 '14 at 18:26
  • `Can't i just run JavaFX applications without installing the whole JDK` - **You can't**. Either you package the jre with the application or install it prior to executing your app. Can you run your app using `java -jar App.jar` and see the error that is been thrown by the JRE ? – ItachiUchiha Aug 27 '14 at 18:38
  • Hey thanks. When I type your command using Admin Rights, the App starts on my PC. As when my friend does it, it won't work. So you mean the Self-Contained Application should work without Java even beeing installed on the User's PC? Can you give me a hint or something how I can "package the jre with the application"? @Kao what kind of information? I got Netbeans 8.0 with JavaFX installed from the latest JDK. Also I am using the Scene Builder to Design my Apps. – user3182679 Aug 28 '14 at 05:01

1 Answers1

0

Since Java 7 there exists the "javafxpackager", renamed to "javapackager" on Java 8 which uses some xml-configuration for generating your wanted "Installer"/distribution-package.

As this does not fit some peoples need, there exists a way to use maven: the javafx-maven-plugin, you can find some examples about the usage of that plugin as linked.

Disclaimer: I'm the maintainer of the javafx-maven-plugin.

FibreFoX
  • 2,858
  • 1
  • 19
  • 41