• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
A timing clock, fuse wire, high explosives and a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic