Don't know how to startS

Hi forum!
Is there any documentation? I could’n find any.
The examples didn’t show me my GameController either.
How can I use jinput? I downloaded the binary jars and put them in the CLASSPATH, but what’s the point with “plugins”, some Readme tolds about “controller”-directory… !!! ???

Someone could point this out quickly?

As for now, I developed a DirectX-DLL, which gets bound to Java via JNI (and therefore is only available on the Windows Platform) and works great.
But of course I want platform independence.

BTW, how is the interface implemented on Linux (native side)??

Hi

Actually, there is a BIG lack of documentation ::slight_smile: - I think Jeff was taking care of it. Am I right?

About the controller dir, it should be in the same dir where you run your game from, and inside of it you put the jinput plugin for your platform (can I put the plugins for ALL platform for better multiplatform support without any problems?).

To start over, you can use a ControllerEnviroment to get the controllers and work on them. The Javadoc can help with this.

That’s about all I can say since I’m new to JInput too ;D

Take a look at the links pointed too by these two threads

HTH

Endolf

Yes, that helps.

To other newbies:
The information I was looking for was

./jinput.jar
./jutils.jar
./controller/libjinput.so
./controller/linux.jar

and that I needed to compile a dxinput.dll on myself.

My sample code is now working on the Win32 platform (returns 5 devices). JWS still doesn’t work. :-[

import net.java.games.input.*;


public class INPUTTEST
{
      static ControllerEnvironment CE;
      static Controller[] CN;
      
      
      public static void main(String[] args)
      {
            CE = ControllerEnvironment.getDefaultEnvironment();
            
            CN = CE.getControllers();
            
            System.out.println("Anzahl Controller: " + CN.length);
      }
}

Big thanks! ::slight_smile:

there is no need to compile any of the plugins yourself - except you want to hack around a little bit. The precompiled file are here: https://games-binaries.dev.java.net/build/index.html

btw: some time ago i had written a test application for jinput which aimed to look and behave a little bit nicer than the ones which are included. you can find the corresponding thread here: http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=jinput;action=display;num=1061080421

[quote]Yes, that helps.
[/quote]
Glad to hear it.

[quote]I needed to compile a dxinput.dll on myself.
[/quote]
Hmm, there is a binary (updated nightly I understand) here

[quote]JWS still doesn’t work.
[/quote]
Try taking a look at the JNLP file here, those binaries are old, but the jnlp file is correct last I tried/heard, and has been tested on linux, windows and mac.

HTH

Endolf