Getting joystick input in Java

I am working on a project that requires me to enter input from the joystick. I will use my Logitech Extreme 3D Pro, but I think it will be the same for all joysticks. If that matters, I use Windows 10. I have done some Google searches, but I cannot find a good answer. I found this one , but I have no idea how to configure it or use it, since I have never installed new libraries before. Therefore, I would be grateful if someone would tell me what to do with this link. If any other solutions are available, I would be more than happy to try them. Finally, do I have the ability to directly access the joystick through the COM port to which it is connected, and perhaps read registers inside the joystick indicating the values โ€‹โ€‹of each axis and buttons? or is it too low for java?

+6
source share
1 answer

This is an old article with instructions on how to install Jinput in Netbeans, but the idea in Eclipse is the same. Follow the instructions, but to add the jinput.jar file to the project, you need to go to the menu "Project"> "Properties"> "Java build path"> "Libraries"> "Add JAR" or "Add external JAR"

Once you have installed it, this one seems to be a pretty good forum post on how to start writing code for the input controller.

Let me know if you need more help by following the instructions in Eclipse.

+1
source

Source: https://habr.com/ru/post/1012117/


All Articles