I am using Linux Mint, Apache ANT and a command line.
I am trying to write a game using LWJGL and am also developing a personal utility library at the same time. I am trying to create a runnable jar file of this game. Using ANT I have created a jar file with all of my classes for the game and a manifest specifying the main class to run and a classpath. My problem is that when I run the game using
java -cp library.jar -jar game.jar
I get a class not found error on a class from library.jar.
If I run the game main class by going
java -cp bin:library.jar game.MainClass
The game runs fine, but the jar won't work. I have expanded the jar file and read the manifest, the class files are all there with the right directory structure (no bin directory, starts with game) and the manifest seems fine. I've tried including the current directory into the classpath (.:library.jar) and I have tried giving a full path to the jar rather than a local path.
Besides actually expanding the entire library.jar into my game.jar how can I fix this? I can give more specific directory information if necessary.