Running JAR file problem
807603Jan 17 2008 — edited Jan 21 2008Hi guys,
I have built a little gui-app in NetBeans which, when compiled, creates a file LadderTrader.jar in the dist folder in the project folder.
I would like to run this jar file from the linux bash line, but then get this error:
+
ltsmm@gertlx:~/gjava/LadderTrader/dist$ java -jar LadderTrader.jar
Failed to load Main-Class manifest attribute from
LadderTrader.jar
ltsmm@gertlx:~/gjava/LadderTrader/dist$
+
I have tried to modify the manifest file (as pointed out here: http://java.sun.com/docs/books/tutorial/deployment/jar/update.html )
but according to this: http://java.sun.com/docs/books/tutorial/deployment/jar/modman.html the manifest can only be modified when the jar is created I think?
I basically need to add the line: " Main-Class : org.LadderTrader" to the manifest somehow, if anyone can point out how I can achieve this in NetBeans that'd be a great help. I'm using NB 5.5.1 and JDK1.5
many thanks,
Gerry
jar newbie