Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (540)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JInput on Windows - IllegalName  (Read 2454 times)
0 Members and 1 Guest are viewing this topic.
Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Posted 2005-08-18 10:41:18 »

When I try to run my code on Windows (with the aproriate dxinput plugin) one thing is that the components are axes now (Huh), so I'll have to modify my code. I don't think I use it correctly, because that shouldn't be. Another, much complicated thing is, that I get a serious error at runtime. Look at that:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
initializing world...Scanning jar: jinput.jar
Examining file : META-INF/
Examining file : META-INF/MANIFEST.MF
Examining file : net/
Examining file : net/java/
Examining file : net/java/games/
Examining file : net/java/games/input/
Examining file : net/java/games/input/AbstractComponent.class
Examining file : net/java/games/input/AbstractController.class
Examining file : net/java/games/input/Component$Identifier$Axis.class
Examining file : net/java/games/input/Component$Identifier$Button.class
Examining file : net/java/games/input/Component$Identifier$Key.classException in thread "main" java.lang.NoClassDefFoundError: IllegalName: net/java/games/input/DirectInputEnvironmentPlugin
   at java.lang.ClassLoader.preDefineClass(Unknown Source)
   at java.lang.ClassLoader.defineClass(Unknown Source)
   at java.security.SecureClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.defineClass(Unknown Source)
   at java.net.URLClassLoader.access$100(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at net.java.games.util.plugins.Plugins.processJar(Plugins.java:112)
   at net.java.games.util.plugins.Plugins.scanPlugins(Plugins.java:85)
   at net.java.games.util.plugins.Plugins.<init>(Plugins.java:73)
   at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(DefaultControllerEnvironment.java:174)
   at net.java.games.input.DefaultControllerEnvironment.scanControllers(DefaultControllerEnvironment.java:164)
   at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultControllerEnvironment.java:57)
   at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:108)
   at java.security.AccessController.doPrivileged(Native Method)
   at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:106)
   at world.controller.CsInput.getInputDevices(CsInput.java:267)
   at world.controller.CsInput.<init>(CsInput.java:286)
   at world.CsWorld.<init>(CsWorld.java:77)
   at demos.XithConcept.<init>(XithConcept.java:154)
   at demos.XithConcept.main(XithConcept.java:222)

Examining file : net/java/games/input/Component$Identifier.class
Examining file : net/java/games/input/Component$POV.class
Examining file : net/java/games/input/Component.class
Examining file : net/java/games/input/Controller$PortType.class
Examining file : net/java/games/input/Controller$Type.class
Examining file : net/java/games/input/Controller.class
Examining file : net/java/games/input/ControllerEnvironment.class
Examining file : net/java/games/input/ControllerEvent.class
Examining file : net/java/games/input/ControllerListener.class
Examining file : net/java/games/input/DefaultControllerEnvironment$1.class
Examining file : net/java/games/input/DefaultControllerEnvironment.class
Examining file : net/java/games/input/Keyboard$Key.class
Examining file : net/java/games/input/Keyboard.class
Examining file : net/java/games/input/Mouse$Ball.class
Examining file : net/java/games/input/Mouse$Button.class
Examining file : net/java/games/input/Mouse$Buttons.class
Examining file : net/java/games/input/Mouse.class
Examining file : net/java/games/input/PluginClassLoader$1.class
Examining file : net/java/games/input/PluginClassLoader$JarFileFilter.class
Examining file : net/java/games/input/PluginClassLoader.class
Examining file : net/java/games/input/Rumbler.class
Examining file : net/java/games/input/StandardKeyboard.class
Examining file : net/java/games/input/Version.class
Examining file : net/java/games/input/test/
Examining file : net/java/games/input/test/AnalogAxisPanel.class
Examining file : net/java/games/input/test/AxisPanel.class
Examining file : net/java/games/input/test/ControllerReadTest$1.class
Examining file : net/java/games/input/test/ControllerReadTest.class
Examining file : net/java/games/input/test/ControllerTextTest.class
Examining file : net/java/games/input/test/ControllerWindow.class
Examining file : net/java/games/input/test/DigitalAxisPanel.class
Examining file : net/java/games/input/test/DigitalHatPanel.class
Examining file : net/java/games/input/test/RumbleTest.class
Examining file : net/java/games/input/DirectInputAxis.class
Examining file : net/java/games/input/DirectInputDevice.class
Examining file : net/java/games/input/DirectInputEnvironmentPlugin.class
Found candidate class: net/java/games/input/DirectInputEnvironmentPlugin.class


Any idea how to fix that?

Qudus
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2005-08-18 11:13:52 »

Hi

I'm sure that the old 'plugins don't work on 1.5' problem. Did you compile your own utils+jinput, or did you download the binaries from somewhere?, if so, which ones?

Endolf

P.S. give http://www.newdawnsoftware.com/resources/jinput/webstart/jinput2.jnlp a try, if it works, then it's your jinput files that are broken. Then we can sort it out at least

Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Reply #2 - Posted 2005-08-18 12:49:44 »

I just downloaded the binaries. I tried this one and this one. The same error in both cases. Except that in the newer one, there where Axes instead of Components.

I wasn't able to startThe jnlp for some reason:
1  
2  
3  
4  
5  
6  
7  
Beim Starten/Ausführen der Anwendung ist ein Fehler aufgetreten.

Titel: JInput webstart demo
Hersteller: New Dawn Software
Kategorie: Download-Fehler

Ressource konnte nicht geladen werden: http://www.newdawnsoftware.com/resources/jinput/webstart/jinput.jnlp


Ah, by the way: thanks for your friendly help.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #3 - Posted 2005-08-18 17:32:17 »

Hmm

I'm assuming that means that the download failed no?

well it works from here, I have no idea how the connection didn't work. The files are there. I viewed them in a browser, and ran it on linux and windows to check. I'm a bit worried that you said that with those files, one had Axes and one had Components was a major worry, as they both are the new Components styles.

Endolf

Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Reply #4 - Posted 2005-08-18 17:54:46 »

Maybe I just bound the wrong libs. I took the jinput.jar (win-plugin), the controller.jar and the jutils.jar (in that order) into my classpath and the jinput-dxplugin.dll's folder as java.library.path. I got no compile time error when I left controller.jar and jutils.jar away. Am I doing this right?

On Linux I get good results when I use in the order mentioned first (of cause with the linux plugin).

Ah, by the way. Is it correct that you have to hold the plugin jar and native in a 'controller' folder in the pwd? This would annoy one who's trying to release a program for both linux and win.

Now when I'm at home again, I'm able to start your webstart example. I can see all my three buttons interact with the labels on the frame. So this looks good.

Ok I just tried it on my windows box. There was a list of some keys but no mouse buttons. some of the keys reacted. So it seems that the mouse wasn't found. There was not any java error.

Edit: OK. Tried it out. It is not necessary to put them into the 'controller' folder. Seems like I got TheBohemian wrong from his tutorial and it was just a suggestion.
Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Reply #5 - Posted 2005-08-18 18:46:40 »

Got it running on my Windows box!

Is there a minimum DirectX version to use with the DirectX plugin? I tried it at work with ... hmm... the one coming with XP, I think. Maybe there should be a better error message. Something like 'there is no directx usable on your system'.

Is there a plugin for windows without directx?

Qudus
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #6 - Posted 2005-08-18 20:41:03 »

Hi

Glad it's working, I'm confused about the mouse issue, we just wrap what directx gives us, there should be 2 windows for each mouse, one is the buttons, and the other is the axis.

Windows plugin required dx 7 or 8, I forget which, either way, default XP has it. No idea why it didn't work. If you could paste the full output from the window, we might be able to spot it.

Endolf

Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Reply #7 - Posted 2005-08-18 23:08:09 »

If you could paste the full output from the window, we might be able to spot it.

Look at my first post in this thread. I believe, it is the full output. Or what else do you need?

Now I'll go to sleep. Tomorrow (in about 8 hours), I will give you more, if you need.

So far, thanks for all your help,

Qudus
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #8 - Posted 2005-08-19 06:30:19 »

Hi

I meant the mouse issues. A class not found is due to classpath issues and controller plugin location issues. If you get the binaries from jinput.dev.java.net under files section, then you automatically get the right plugin in a place it can be accessed. I was hoping we could sort the mouse issue out for you.

Endolf

Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Reply #9 - Posted 2005-08-19 11:30:47 »

It seems to be a problem on my windows pc at work. Another win pc (identical to mine) doesn't have that problem. Since I have no sound with my pc I think I'll have a general directx problem or so.

As I reported earlier, my XP box at home is able to make use of JInput.

So it doesn't seem to be a problem with jinput. But the error message is irritating anyway. I'll try to sort out the problem with my pc and will report to you if I found a solution.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Marvin Fröhlich

Senior Devvie




May the 4th, be with you...


« Reply #10 - Posted 2005-08-19 12:10:10 »

It's running!

I deleted all the libraries and natives of xith, jinput and so on and placed them cleanly and newly to the right positions. Now it's working. No idea, what I made wrong.

Thank you very much for your help.

Qudus
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #11 - Posted 2005-08-19 12:27:38 »

Excelent. The new dist system is much simpler as you just have one jar and one native lib, so it's really easy to distribute, the webstart demo is far easier to put together now for example Smiley

Endolf

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (23 views)
2014-12-23 03:34:11

rwatson462 (53 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (85 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (78 views)
2014-12-05 12:39:02

SHC (89 views)
2014-12-03 16:27:13

CopyableCougar4 (95 views)
2014-11-29 21:32:03

toopeicgaming1999 (155 views)
2014-11-26 15:22:04

toopeicgaming1999 (151 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!