How do I run a .jar executable java file from outside NetBeans IDE?

Bob picture Bob · Oct 7, 2008 · Viewed 79.8k times · Source

How do I run a .jar executable java file from outside NetBeans IDE? (Windows Vista). My project has a .jar file created by Netbeans. We'd like to run it. Either: how do we run the file or how do we create a 'proper' executable file in NetBeans 6.1?

Answer

Laplie Anderson picture Laplie Anderson · Oct 7, 2008

Running a jar is as simple as

java -jar filename.jar