Jump to content
  • Advertisement
Sign in to follow this  
H_o_p_s

[java] JInput

This topic is 2719 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement

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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!