|
This isn't java code related but java related. I am trying to create a .jar file to package up 3 classes so it can be run by others without having random class files floating around. The issues is the .jar file says "Could not find the main class. Program will exit." All searches on google point to a manifest problem. However my manifest file is included and correct "Main-Class: GetUserNames" is in there like it should be. My manifest.mf looks like this: code:
I'm packaging the jar using command prompt on windows xp. I type the following code:
|
# ¿ Aug 1, 2008 20:49 |
|
|
# ¿ May 19, 2024 20:44 |
|
1337JiveTurkey posted:Did you fully qualify the name? You can't just say GetUserNames if it's actually com.example.GetUserNames, then you need to add that so it knows what package to look in. If it goes above 70 characters (I think this is the right number), then you should truncate the line at that point and continue on the next, leading with a whitespace. Here's an example created by Ant that I built yesterday: That's the name of the class file itself. All it contains is the one class with a main method, is there something I am missing with this whole package thing?
|
# ¿ Aug 2, 2008 01:56 |