Hey,
I am creating a Java game, and I’d like to include JInput with it so that players can use controllers to play the game. The problem is, I’m trying to package up this game as an executable JAR file, and I’m afraid I don’t know how to set things up so that classes in the executable JAR can see the classes contained in the jinpur.jar file; whenever the execution in the executable JAR gets to a class where there are Controller or Component-type objects, I see ClassNotFoundExceptions.
I found a link here that gives a partial explanation for an idea of how to load classes from a JAR file within an executable JAR file, and I’ve tried to implement it, with only partial success:
http://forum.java.sun.com/thread.jspa?messageID=10239359&tstart=0
When I say “partial success”, I mean that I can get an URLClassLoader that (I’m 95% sure) looks at the jinput.jar file, but when I try to call loadClass(“net.java.games.input.ControllerEnvironment”) on that URLClassLoader, I get ClassNotFoundExceptions.
Can anyone else tell me how I can load classes from a JAR within an executable JAR? Or even any advice on how to get an executable JAR file so it can use classes contained within another JAR file would be great.
The peace of Jesus Christ be with you