Hello everybody.:)
I'm a beginner and I need your help.
I have a GUI programme and I need to make it run from an icon on the desktop. can you help me with an easy way to do so?
Printable View
Hello everybody.:)
I'm a beginner and I need your help.
I have a GUI programme and I need to make it run from an icon on the desktop. can you help me with an easy way to do so?
I tried doing it through jar file. but for some reason it doesn't work:confused:
here's what I did-
I created manifest.txt
inside it says "Main-Class: MainGui
"
(MainGui is the name of my main class) and I put the txt file into the project folder.
then I created jar file (I didn't understand any other way that was suggested on the web to do it ,so I went "File->export->jar file..etc) and I checked the box to include the manifest.txt
but when I click on the jar file on my desktop I only hear an error sound! I guess I did something wrong.
please I'm realy a beginner I need help!!:o
Are you working on any IDE?
First of all what you've to do is, create the jar file correctly. I believe that you've set of java class files which are working fine, no errors at all. So the next step is creating the manifest file. Open the command prompt and navigate ti your working folder. Then type the following command there.
Then you've to bundle the all classes with that file, it's done by the following command.Code:C:\MyApplication>echo Main-Class: [I]YourMainClass[/I] >manifest.txt
Then test the jar file as follows.Code:C:\MyApplication>jar cvfm [I]JarFileName[/I].jar manifest.txt *.class
This is the easiest way to build the jar file for your application, just give a try and let me what's happen. Did you have any images in your applications, and any other resource files?Code:C:\MyApplication>[I]JarFileName[/I].jar