W
William Colls
Environment:
Ubuntu 10.04.2 64 bit
Java 1.6.0_24
NetbeansIDE 6.8
I have built a small application containing two classes. When I build
the application in the IDE, it builds without error, and creates a .jar
file.
When I try to run the .jar using the command
java -jar myapp.jar
I get the error
Failed to load Main-Class manifest attribute from myapp.jar
One of the class files does contain the main declaration
public static void main(String args)
From my reading, I understand that there should be a file with the name
manifest.txt in the build directory that gets incorporated into the .jar
file, but I don't know what the contents of the file should be. My
original understanding of how the IDE worked led me to believe that it
would create the manifest file automatically, but this doesn't seem to
be happening.
Any guidance would be greatly appreciated.
Thanks for your time.
Ubuntu 10.04.2 64 bit
Java 1.6.0_24
NetbeansIDE 6.8
I have built a small application containing two classes. When I build
the application in the IDE, it builds without error, and creates a .jar
file.
When I try to run the .jar using the command
java -jar myapp.jar
I get the error
Failed to load Main-Class manifest attribute from myapp.jar
One of the class files does contain the main declaration
public static void main(String args)
From my reading, I understand that there should be a file with the name
manifest.txt in the build directory that gets incorporated into the .jar
file, but I don't know what the contents of the file should be. My
original understanding of how the IDE worked led me to believe that it
would create the manifest file automatically, but this doesn't seem to
be happening.
Any guidance would be greatly appreciated.
Thanks for your time.