Hey guys –
I’ve got a project that uses LWJGL, and I keep trying to create an executable JAR file (so I can make a JNLP), but executing the file always fails. I’ve got the manifest with the main class specified, and I’ve even tried to have Eclipse do it automatically with the same results. I think the problem is that while working in Eclipse, it automatically includes the workspace in my class path, and therefore the LWJGL JARs and dylib’s are all included in the path. When I make a JAR, however, it seems even to ignore everything within the JAR as part of its class path (I have the JARs and the dylibs inside the folder for the JAR file I am building).
So how can I specify the class path correctly so that it includes everything within its own directory? I tried just a slash, but that does nothing.
Main-Class: Agent00PK
Class-Path: /
The above was one attempt at a manifest, another was without the “Class-Path” part. I also tried creating a containing folder called “Agent00PK” and making that the class path, but that didn’t work either. I seem never able to get the class path working at all. Do I need to specify containing folders as well?
Help, please!
Thanks.
PS – Even though I’ve been programming in Java for 5 years, I have simply dealt with not knowing how to do this by putting the JARs into my Java Extensions folder. I’d love to finally learn how to get this working.
Ah… I couldn’t find the error reports, but I finally located them (the new OS X puts them in subfolders).
Apr 13 19:58:40 computer [0x0-0x4d24d2].com.apple.JarLauncher[10557]: Exception in thread "main"
Apr 13 19:58:40 computer [0x0-0x4d24d2].com.apple.JarLauncher[10557]: java.lang.NoClassDefFoundError: Agent00PK
I started with Kev’s tutorial but couldn’t get the classpath part to work when making my JAR file, so I couldn’t get anywhere beyond that.
