Skip to main content
gamedev.net
🔒 Locked

[java] JInput

Started by H_o_p_s Sep 24, 2005 at 12:38 PM 0 replies 3k views
Original Post
H_o_p_s
H_o_p_s
I tried to JInput working today, but can't seem to get the dang thing compiled (even with the java tutorial) So I am hoping that somebody here might have an example JInput program that I could see the source to, and see a compiled version to test out... If there are also any other tutorials besides the one on JInput's homepage (that doesn't require ant) I would also enjoy reading those. Thanks!
BRING BACK THE BLACK (or at least something darker)
xerxes_is_kind
xerxes_is_kind

I tried to JInput working today, but can't seem to get the dang thing compiled (even with the java tutorial) So I am hoping that somebody here might have an example JInput program that I could see the source to, and see a compiled version to test out...If there are also any other tutorials besides the one on JInput's homepage (that doesn't require ant) I would also enjoy reading those.Thanks!


yeah, It's a bit hard to get started. okay so what you need to do is get one of the builds http://www.newdawnsoftware.com/resources/jinput/
extract these files somewhere.

I use the Eclipse IDE: right click on your project folder and choose properties>java build path>add external jars>browse to find your JInput.jar file you extracted.

the second part is where to put those .DLL files which you also extracted... you must copy and paste them into where your JRE is installed: mine is "C:\Program Files\Java\jre6\bin"
make sure you put it in the bin folder.
Try and run a simple program like:
you will need to import classes: like "net.java.games.input.*;"
main method{
for(Controller c: ControllerEnvironment.getDefaultEnvironment().getControllers()){
System.out.println(c.getType());
}

}


if you are still getting errors copy and paste your jinput.jar file into a path similar to "C:\Program Files\Java\jre6\lib\ext"

Hope this helps!
If you need anything else, just ask!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.