This content has been marked as final. Show 12 replies
is it UI_MainWindow or Ui_MainWindow?
They both should be the same in the .class AND in the Manifest.txt...
i guess when you type you make lots of mistakes.
Make sure your manifest file has a new line at the end.
Make sure there is no typo in your command.
Don't forget to add Manifest.txt rather than mainfest.txt mainfeast.txt
Your manifest seems to be ok. Rename it to manifest.MF and put it in a folder called META-INF. Then, zip your Ui_MainWindow.class file and the META-INF folder. Rename it to app.jar.
Now, keep your .jar libraries in the same directory as your app.jar. Just double click it or run through the command line using 'java -jar app.jar'
That file is Ui_Main_Window.class that was typing mistake but when creating the jar i have typing correctly
I am not done any typing mistake while creating the jar file i already followed the suggestion that you have mentioned but still the same error .
This is my MANIFEST.MF file created under META-INF folder
Class-Path: qtjambi-4.4.3_01.jar qtjambi-win32-msvc2005-4.4.3_01.jar
Created-By: 1.5.0 (Sun Microsystems Inc.)
When i extracted the app.jar following this i got
1. META-INF folder inside that MAINFEST.MF file the contents i have already placed above
Please tell me whats wrong in that i can also give you the app.jar file please let me know the email id ..
sorry again typo mistake that file name is MANIFEST.MF not MAINFEST.MF
As far as the spelling mistakes go, please try to get into the habit of copy/pasting information.
One thing that I have not heard mentioned, is to check that the manifest has a blank line at the end.
What is the exact (copy/pasted) error that you are getting when running that Jar?
Could not find the main class. Program will exist. This is the error i am getting ...........
Thanks i have added the blank line now it is working fine...
Thanks a lot for solving this problem
>You are welcome. I think most of us have been caught out by that obscure problem, yet Sun maintains it is not a bug and will (therefore) not be fixed. An unfortunate aspect of these forums is that the CODE tags (usually quite handy) will cause the last line in a valid manifest file to disappear from the forum listing!
Thanks a lot for solving this problem>
These days I get Ant to write manifest files for me. It never forgets to add that blank line. ;-)
When I use jGRASP it remembers the blank line...
however i still get the error
can not find main class Program will exit
it is the most annoying thing
Please, don't resurrect old threads. I'm now locking this one.