Java & Mac

Post questions, comments and feedback to our 3Dconnexion Mac Development Team.

Moderator: Moderators

Post Reply
formatt
Posts: 6
Joined: Sat Oct 13, 2007 11:00 am

Java & Mac

Post by formatt »

Hi.

I'm a student writing a VJ app in Java/JOGL and I'd like to be able to hook up the Space Navigator and do some cool things.

I've heard about jinput, but I wondered if anyone has got any links to some kind of guide to setting this up with Java on a Mac?

I'm still a bit green as far as programming goes, but learning fast, so I'd appreciate any help that is offered.

All the best.

Matt.
formatt
Posts: 6
Joined: Sat Oct 13, 2007 11:00 am

Post by formatt »

Just an update.

I think I have jinput installed correctly and when I run:

Code: Select all

java net.java.games.input.test.ControllerTextTest
I get this:

Code: Select all

Controller Env = net.java.games.input.DefaultControllerEnvironment@dd5b
Loading: net.java.games.input.OSXEnvironmentPlugin
And it lists all my peripherals including usb mouse and bluetooth keyboard but no Space Navigator.

Also not listed here:

Code: Select all

java net.java.games.input.test.RumbleTest
Loading: net.java.games.input.OSXEnvironmentPlugin
Scanning Apple Internal Keyboard / Trackpad
Found 0 rumblers
Scanning Trackpad
Found 0 rumblers
Scanning Apple Internal Keyboard / Trackpad
Found 0 rumblers
Scanning matt
brupbacher
Posts: 13
Joined: Tue Oct 02, 2007 1:35 pm

same problem

Post by brupbacher »

hmm, I did exactly the same and i got exactly the same results
did you get any further?

some one talked about a HIDWrapper.jar did you manage to find and use this?

java -> jinput -> spacemouse works perfectly on windows but here on Mac OS X, no signe of it during detection...
formatt
Posts: 6
Joined: Sat Oct 13, 2007 11:00 am

Post by formatt »

Hi.

No unfortunately didn't have enough time to experiment further. It's been a while now since I looked at it, but I'm still interested to find a way to make it work...
brupbacher
Posts: 13
Joined: Tue Oct 02, 2007 1:35 pm

lets find a way

Post by brupbacher »

okidoki lets try to find a solution, i trew some emails around the internet, there must be some clever guy knowing something about that :-)
as i mentionned, I have one hint HIDWrapper.jar...
the only thing i can imagine is there is a missing piece between:

-> jinput java->native library->MISSING->HID->driver->device

(my be the order is not correct since i don't know yet what the missing piece is)

its a mac thing, lets find out...
brupbacher
Posts: 13
Joined: Tue Oct 02, 2007 1:35 pm

not yet working

Post by brupbacher »

did any body got any further with this issue?
still not success, will restart
Nik777
Posts: 3
Joined: Thu Oct 18, 2007 5:48 pm
Location: Sydney Australia

SpaceNav, Java, OSX

Post by Nik777 »

Hi,

I have just got a result with jinput and SpaceNav on OSX.
In fact I have the same Java app working with the SpaceNav under linux, Windows and OSX :-)

I had to add 2 lines of code to a class in the jinput.jar file to get OSX working.
I can either post the patch, or post the binary JAR file if that helps people.

I have been doing my testing on an older version of OSX (10.4) and the only other OSX tester uses a newer version and is getting very different results than I am, so there are still some issues regarding consistency of the values returned from poll().

I am currently investigating the jinput event queue in the hope this may make some of my results more consistent across different versions of OSX.

Cheers!
Nik
I would not be a member of any club which would have me as a member - Groucho Marx
brupbacher
Posts: 13
Joined: Tue Oct 02, 2007 1:35 pm

pliiiiis!! this is GREAT

Post by brupbacher »

THANK YOU SO MUCH!!
could you post the jar =-) pliiiis

I think you should tell the jinput people about your imporvements!
great job!!
Nik777
Posts: 3
Joined: Thu Oct 18, 2007 5:48 pm
Location: Sydney Australia

Modified jinput JAR

Post by Nik777 »

Hi Brupbacher,

Great to see you are still interested - and my apologies for the delay - I've been working on a few things, and spending any spare time in trying to get the SpaceNavigator working well on all platforms.

Java 1.5 on OSX is a particular problem at the moment. The device is being found, and events are being received, but there is something different in Apple's Java that makes my EventLoop behave quite differently on OSX.

I am, however, no more than a week away from a solution, so if you encounter similar problems, come back and ask :-)

I've uploaded the modified JAR onto the SourceForge project for which I made the changes.

The direct link should be:
http://downloads.sourceforge.net/aoisp/ ... se_mirror=

If this gives problems, then go to this page and select the jinput-with-OSX-fix.zip file

http://sourceforge.net/project/showfile ... _id=305721

And if that gives no joy, then go to the "aoisp" project on SourceForge, click "downloads", go to the "HIDPlugin" package, and download the file.

(aoisp is a project that publishes plugins for the pure-java 3D modelling and rendering package "Art Of Illusion")

Good luck and have a Happy New Year! :-)

Cheers!
Nik
I would not be a member of any club which would have me as a member - Groucho Marx
brupbacher
Posts: 13
Joined: Tue Oct 02, 2007 1:35 pm

great

Post by brupbacher »

will try, what you have so far and give you feedback.
looking forward to see the final version :-)

again, thanks allot for your effort!
Post Reply