I have created a project in netbeans and I clean and built the jar file. But I double clicked on jar file doesn't run the jar file. Why is this jar file is not running ?
Asked
Active
Viewed 475 times
0
-
3You need to set the Main class (class with a `main(String...)` method) in the manifest. Those are keywords, google it. – Sotirios Delimanolis Jul 16 '13 at 16:21
-
but in manifest file, it has been written that "X-COMMENT: Main-Class will be added automatically by build" – Priya Jul 16 '13 at 16:27
1 Answers
0
you didn't give us very much information, but if you are developing in windows, and your program is all console based, when you double click the jar, it will run, but you will not be able to see it because it has nothing to show you the output in. You can get around this two different ways. 1. Develop your own console gui 2. run the jar through cmd. you can write a batch file to do this for you if you want.

user2464620
- 68
- 6
-
I am making my project in netbeans and creating its jar file by option "cleen and build project" . Is something wrong in the method of making jar file ? – Priya Jul 17 '13 at 02:50
-
@pirya I'm not sure if you have fixed your problem yet but, what operating system are you developing in? and did you make a gui for your program? – user2464620 Jul 17 '13 at 14:03