File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Game Development and the fly likes Modern (or at least still alive) Joystick library for Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "Modern (or at least still alive) Joystick library for Java?" Watch "Modern (or at least still alive) Joystick library for Java?" New topic
Author

Modern (or at least still alive) Joystick library for Java?

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

I'm trying to interface to a neat new joystick with Java, and I'm not finding anything that is current. The best looking jar files are 'jinput' but that project is locked on Java.net, the url is https://jinput.dev.java.net/

It doesn't seem to have any active development, or support. Things like the "getting started" link get a 404.

There are assorted references that you can find by googling for "game" or Joystick API, but none seem current. There is even a fair amount of discussion of "standard Java Game API" with input devices, which sounds promissing, but I'm not finding where this standard API is documented, etc.

I can probably reverse engineer if from the C code I can find, but that feels like more work than I want, I really need to move onto the game coding.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Well, after not finding a lot of (any?) viable competitors, I did find some useful information in 'jinput' at
http://www.java-gaming.org/ including a good "getting started" thread.

The key concept is that the binary distribution includes some JNI code and matching DLL, .so or -osx.jnilibf files.
There seems to be a moderately active forum on java-gaming as well.
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

It seems like JMonkey supports Joysticks. But I have no clue to what degree or what is working under the hood. See the discussion here: http://jmonkeyengine.org/groups/general-2/forum/topic/joystick-virbation/
Documentation seems to ... ehm... lacking: http://jmonkeyengine.org/javadoc/com/jme3/input/Joystick.html
Maybe you get something useful from the sources.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

I've written a small set of Java classes that I've used to teach myself jinput, and to test how my Logitech 3D joystick works. Its open source, and may be useful to some other beginner.
http://pfarrell.com/java/joysticklib.tar.gz

It was written using Netbeans, but should work with any setup that can use the ANT scripts.
 
 
subject: Modern (or at least still alive) Joystick library for Java?
 
Similar Threads
Right mouse clicks on a mac?
Calling all joystick users
How to start?
Is Web Start good for my application?
Locating Microsoft Excel executable