ARGH! what am i doing wrong?

this question might belong in newless cluebies, but here goes…

i downloaded the jinput release for directinput from
http://www.newdawnsoftware.com/resources/

and extracted it to a folder on the desktop.

downloaded the jinputtester jar and put it in the same folder as the above, ran it, and get the following exception:

 Directory of C:\Documents and Settings\Judd\Desktop\jinput_directx_dist

22/09/2003  06:37 PM    <DIR>          .
22/09/2003  06:37 PM    <DIR>          ..
22/09/2003  06:28 PM    <DIR>          controller
05/08/2003  06:05 PM            37,633 jinput.jar
22/09/2003  05:16 PM            23,295 jinputtester.jar
22/09/2003  06:36 PM             8,381 jutils.jar
               3 File(s)         69,309 bytes
               3 Dir(s)   5,383,664,128 bytes free

C:\Documents and Settings\Judd\Desktop\jinput_directx_dist>java -jar jinputtester.jar
Exception in thread "main" java.lang.NoClassDefFoundError: net/java/games/util/plugins/Plugins
        at net.java.games.input.ControllerEnvironment.<clinit>(ControllerEnvironment.java:73)
        at robs.jinput.JInputTester.<init>(JInputTester.java:22)
        at robs.jinput.JInputTester.main(JInputTester.java:29)

is this due to JInput changing since the tester was created or is there something special i am supposed to be doing with JInput binaries to get it to work?

jinput isn’t standalone. You additionally need the core package.

where do i find that?

there is not enough documentation for people like me who dont know where to look to get started.

does anyone have a link or some info on how JInput works?

JuddMan contacted me on ICQ and we figured it out…

You can’t run jinputtester.jar with -jar, it messes up the classpath that way.

java -cp .;jinput.jar;jutils.jar;jinputtester.jar robs.jinput.JInputTester

did the trick.

[quote]JuddMan contacted me on ICQ and we figured it out…

You can’t run jinputtester.jar with -jar, it messes up the classpath that way.

java -cp .;jinput.jar;jutils.jar;jinputtester.jar robs.jinput.JInputTester

did the trick.
[/quote]
…is this just a case of needing to modify the jinputtester.jar manifest to explicitly load the other JAR files?

I remember I had some serious pain with JAR’s not being accesibel to each other EVEN THOUGH they were on the classpath, until I found about this :(.

Could be, but I don’t know if that is the right solution either. for instance, I have installed jinput.jar and jutils.jar as Extensions in my JRE, so it is they always available.
I had assumed that it would be installed as some sort of shared component for many games to access, rather than one at a timing it for each individual game. But of course either way will work.

If jinputtester.jar were set up with WebStart and the JInput stuff was installed via an extension installer I think everything would work out. They really need to get that server glitch worked out at java.net so the latest releases of the core projects can be properly hosted as Web Start extension installers, without them re-downloading every time.

I haven’t looked at the manifest yet.

@JuddMan:
The problem with my app is the following. I assumed to have Jinput and every needed plugin already installed as an extension (jre/lib/ext for jinput.jar and jutils.jar and the ‘controller’ directory under jre/lib). If you do that everything would work fine.

I would change this behaviour but currently there is no documentation about where to put the plugin when jinput should not be installed as an extension.

Update!
I tested this while writing this post: jinput.jar jutils.jar and the controller dir with the appropiate files inside may live in the same directory as jinputtester.jar. The manifest’s class-path is to be changed to “jutil.jar jinput.jar” and everything works fine. That means: java -jar jinputtester.jar works …

I will update the binaries on the server to reflect that change. (Done!)

I also have included a small check that displays some useful suggestions when jinput is not available instead of spitting exception data.

ok.

jinputtester is a good program, it’ll come in very useful. im starting a small project with jinput though it has no name yet.

Just a quick note at any newbie reading this thread. The jinput on newdawnsoftware.com is quite old binary. Nightly builds should be available at https://games-binaries.dev.java.net/ .

HTH

Endolf