making executable file from a java project using NetBeans

gandalf picture gandalf · Aug 6, 2013 · Viewed 73.9k times · Source

i have created a java project in NetBeans. now i want to make an executable file out of it.that can be executed (run) in other computers that have JDK or JRE installed but don't have NetBeans or any other Java IDE installed.how can i do such thing using NetBeans???

Answer

Dennis Kriechel picture Dennis Kriechel · Aug 6, 2013

Do you mean compile it to JAR? Netbeans does that automatically, just do clean and build (hammer sybol) and look in the dist subdirectory of your project. There will be the JAR with lib folder containing the required libraries. These JAR + lib are enough to run the application.

Maby you unchecked an option:

Project Properties -> Build -> Packaging -> Build JAR after compiling

(but this is enabled by default)