This content has been marked as final. Show 3 replies
alley wrote:You don't have to pack it into a JAR file, but it's often the most convenient way. That way it'll be a single file and if the computer (and your file) has correct settings, you can just double click on the jar to run the program.
Now if I want this program to run on other pc's on its own (without NetBeans or any other program), preferably through a GUI, do I have to convert it to a JAR file? How does this exactly works out?
I recommend some Google research on JAR files and what's the easiest way to create them from Netbeans.
alley wrote:And Netbeans does it using the JDK. it is always the JDK, no matter how many tools you wrap around it on top. You don't need Netbeans to run your stuff either, it is merely a development convenience that Netbeans provides you.
So I have this Java program compiling on my pc through NetBeans.
Now if I want this program to run on other pc's on its own (without NetBeans or any other program)Impossible - you need at least a compatible Java runtime.
, preferably through a GUIYou mean by double clicking on the program icon through the OS?
, do I have to convert it to a JAR file?That would be an easy way yes - an executable jar to be more precise
How does this exactly works out?Netbeans builds the jar automatically, just check out the folders of your project to find it. If you set a main class in the project properties, it is even an executable jar. Double click it and if the Java runtime is properly setup (which tends to be the case when it installs succesfully, but many people manage to screw it up in a way I can't imagine anyway), it will run.
For further guidance, check the online netbeans manual and research executable jars.