I usually use eclipse, and when I export a J2SE project, I get a jar file which I can simply double click to run it.
With netbeans 6.8, I do same thing (clean and build), then in the dist folder, theres also a jar.
When I try to run it, nothing happens. But if I drop the file onto ExecutorDemo, to make an exe, it then works (as it does with eclipses' jars).
But it doesn't work just as jar, and the actual jar size with netbeans is much bigger than with eclipse, even when compression is applied.
Can anyone tell me why netbeans jars dont run when double clicked, thanks.
Have you examined the contents of the JAR file, including the contents of the manifest.mf files, to determine the difference? Another thing to try is running the JAR file the command line:
If it's a NetBeans project, you need to specify the Main class in the project properties. NetBeans will then create a MANIFEST.MF that will contain the Main-Class entry.
Afterwards, you can simply double click the JAR (if you're in Windows) or run it in the command line via java -jar yourjar.jar
Hope it helps.
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.