• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
Rancher
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4686
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic