I'm using Eclipse Juno Release 2
I export the project as a Runnable JAR file, it doesn't give me the option of creating a manifest file.
I did find the manifest in the generated jar file, it contains:
Manifest-Version: 1.0
Rsrc-Class-Path: ./ netty-codec-http-4.0.13.Final.jar slf4j-api-1.7.5.
jar jackson-databind-2.2.3.jar RXTXcomm.jar slf4j-simple-1.7.7.jar ja
ckson-core-2.2.3.jar netty-socketio-1.6.0.jar jackson-annotations-2.2
.3.jar netty-common-4.0.13.Final.jar netty-buffer-4.0.13.Final.jar ne
tty-codec-4.0.13.Final.jar netty-handler-4.0.13.Final.jar netty-trans
port-4.0.13.Final.jar
Class-Path: .
Rsrc-Main-Class: cantley.co.uk.clsMain
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
Looks like the Main-Class isn't correct. I've edited and changed to read:
Main-Class: cantley.co.uk.clsMain
Now I get:
java.lang.reflect.InvocationTargetException
at java.lang.reflect.VMMethod.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:327)
at jamvm.java.lang.JarLauncher.main(JarLauncher.java:50)
Caused by: java.lang.OutOfMemoryError
<>
I then modified the build to export the files to a sub-folder, the manifest now reads:
Manifest-Version: 1.0
Class-Path: . DSgateway_lib/netty-codec-http-4.0.13.Final.jar DSgatewa
y_lib/slf4j-api-1.7.5.jar DSgateway_lib/jackson-databind-2.2.3.jar DS
gateway_lib/RXTXcomm.jar DSgateway_lib/slf4j-simple-1.7.7.jar DSgatew
ay_lib/jackson-core-2.2.3.jar DSgateway_lib/netty-socketio-1.6.0.jar
DSgateway_lib/jackson-annotations-2.2.3.jar DSgateway_lib/netty-commo
n-4.0.13.Final.jar DSgateway_lib/netty-buffer-4.0.13.Final.jar DSgate
way_lib/netty-codec-4.0.13.Final.jar DSgateway_lib/netty-handler-4.0.
13.Final.jar DSgateway_lib/netty-transport-4.0.13.Final.jar
Main-Class: cantley.co.uk.clsMain
But when I try to run the jar I get:
java.lang.ClassNotFoundException: cantley/co/uk/clsMain
at java.lang.VMClass.forName(Native Method)
at java.lang.Class.forName(Class.java:233)
at jamvm.java.lang.JarLauncher.main(JarLauncher.java:46)