Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (541)
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  
  what is wrong with that?  (Read 3516 times)
0 Members and 1 Guest are viewing this topic.
Offline significantfrank

Senior Newbie





« Posted 2005-10-03 06:26:22 »

it is my first time to use Jinput, and i can compile ControllerReadTest.java,but when i  run it.
it comes exception :
java.lang.UnsupportedClassVersionError: net/java/games/util/plugins/Plugins (Unsupported major.minor version 49.0)
so what is problem?
thx in advance.
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #1 - Posted 2005-10-03 06:35:41 »

Hi

This means that you used jdk 1.5 to compile the code, but are trying to run it on jdk 1.4 or less.

Check which jdk javac is from, and check your path variable to check which jre it's in.

All the binaries on the jinput.dev.java.net should be 1.4 now after Kevglass pointed out that I had built them with 1.5

HTH

Endolf

Offline significantfrank

Senior Newbie





« Reply #2 - Posted 2005-10-07 08:50:06 »

ok,i have tried some other versions,but new problems occurs:

Scanning jar: dxinput.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/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
Adding class to plugins:net.java.games.input.DirectInputEnvironmentPlugin
Examining file : net/java/games/input/DirectInputKeyboard.class
Examining file : net/java/games/input/DirectInputMouse$BallAxis.class
Examining file : net/java/games/input/DirectInputMouse$BallImpl.class
Examining file : net/java/games/input/DirectInputMouse$ButtonImpl.class
Examining file : net/java/games/input/DirectInputMouse$ButtonsImpl.class
Examining file : net/java/games/input/DirectInputMouse.class
Examining file : net/java/games/input/DirectInputRumbler.class
OS name is: Windows XP
DX8 plugin is supported
java.lang.UnsatisfiedLinkError: no jinput-dxplugin in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
   at java.lang.Runtime.loadLibrary0(Runtime.java:788)
   at java.lang.System.loadLibrary(System.java:834)
   at net.java.games.input.DirectInputEnvironmentPlugin.<clinit>(DirectInputEnvironmentPlugin.java:62)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
   at java.lang.Class.newInstance0(Class.java:308)
   at java.lang.Class.newInstance(Class.java:261)
   at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(DefaultControllerEnvironment.java:208)
   at net.java.games.input.DefaultControllerEnvironment.scanControllers(DefaultControllerEnvironment.java:189)
   at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultControllerEnvironment.java:58)
   at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultControllerEnvironment.java:109)
   at java.security.AccessController.doPrivileged(Native Method)
   at net.java.games.input.DefaultControllerEnvironment.getControllers(DefaultControllerEnvironment.java:107)
   at ControllerReadTest.<init>(ControllerReadTest.java:18)
   at ControllerReadTest.main(ControllerReadTest.java:80)
Exception in thread "main"
endolf  could you tell me what is the problem?
thx
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-10-07 10:08:51 »

Hi

Thats an easy one, and common. The native library can't be found, make sure you add -Djava.library.path=<folder containing the jinput-dxplugin.dll> to your start script/command

HTH

Endolf

Offline significantfrank

Senior Newbie





« Reply #4 - Posted 2005-10-07 12:06:38 »

i use the jre of 1.50,and get your recently release of Jinput.
and it works now,since i felt depressed and exhausting these days,now i feel better.
endolf,thanks for you help and your work on Jinput Wink
Offline significantfrank

Senior Newbie





« Reply #5 - Posted 2005-10-07 12:29:52 »

endolf
sorry to bother you again.
is there some Jinput  API Specification? which tells what the classes mean and how the methods work. 
if there is some,could you post it?
thanx a lot
Offline Jeff

JGO Coder




Got any cats?


« Reply #6 - Posted 2005-10-08 04:30:49 »

There are Javadocs  in the code.

Thats about it outside of the brief readmes.

There are also some examples  around if you look through the threads here.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #7 - Posted 2005-10-09 16:38:10 »

Hi

Sorry for the delay in replying, was busy getting married Smiley

Basic rundown

Get the ControllerEnvironment by calling getDefaultEnvironment(), this gives you the plugin for the environment. From that you can get your controllers

A controller in jinput is not just a device like a joystick/mouse/keyboard/gamepad, but may also be some *part* of a device. For example, there maybe a controller instance to represent a mouse, but this may have no components, it may be that it has instead 2 sub controllers, one for the ball, and one for the buttons.

A Component is an axis, a button, or a key. From the components you can get information about the component, like the value, whether it's absoulte or relative, if it's boolean or analog etc etc.

You must remember to poll the controllers, I recommend polling at least 50 times a second. If you don't poll frequently enough, you will fill up the underlying buffers and start losing input events.

HTH a little

Endolf

Offline Jeff

JGO Coder




Got any cats?


« Reply #8 - Posted 2005-10-09 20:49:40 »

Hi

Sorry for the delay in replying, was busy getting married Smiley


Hey hey!  Congrats!  Gonan post pictures?

Quote
You must remember to poll the controllers, I recommend polling at least 50 times a second. If you don't poll frequently enough, you will fill up the underlying buffers and start losing input events.

Really?  Thats ugly.  Is that in the general Java code as opposed to to the plug-ins? If so do we want to thin kabout replacing them with ring-buffers?


JK

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline significantfrank

Senior Newbie





« Reply #9 - Posted 2005-10-10 12:32:53 »

wow~~~congratulations for your marry!
so i can guess you will be abscent here for some days,and have a nice honey-moon Tongue

and jeff, i cant see the javadoc in my downloading files.could you give some  valid link? thx
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 #10 - Posted 2005-10-10 13:56:34 »

Hi

Pictures will no doubt appear at some point yes Smiley

The honey moon is in november, so you have me till then i'm afraid Smiley

The buffer problem is a directx issue, we can increase the buffer size as it's creation is controlled by the plugin, but the implementation isn't controllable, just it's size.

The javadoc can be got from the jinput site in the files section.

Endolf

 

Offline significantfrank

Senior Newbie





« Reply #11 - Posted 2005-10-12 09:12:16 »

so, why  your honey moon is postponed to november Undecided
another question.
my OS is a chinese system.when i used the controller.getName( ) and component.getName( ),i just can get some disorder code.
how can i resolve this problem? 
Offline endolf

JGO Coder


Medals: 7
Exp: 15 years


Current project release date: sometime in 3003


« Reply #12 - Posted 2005-10-12 11:46:15 »

Hi

The honeymoon is in november because we have other things going on this month Smiley

The jinput package has in it some tests. Could you run net.java.games.input.test.ControllerTextTest for me? (it's in the jinput.jar)

Please either post the whole output, or put it on a website and link to it. I have an idea, but I'd like to check

Thanks

Endolf

Offline significantfrank

Senior Newbie





« Reply #13 - Posted 2005-11-09 12:38:34 »

This is the output:
Scanning jar: dxinput.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/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
Adding class to plugins:net.java.games.input.DirectInputEnvironmentPlugin
Examining file : net/java/games/input/DirectInputKeyboard.class
Examining file : net/java/games/input/DirectInputMouse$BallAxis.class
Examining file : net/java/games/input/DirectInputMouse$BallImpl.class
Examining file : net/java/games/input/DirectInputMouse$ButtonImpl.class
Examining file : net/java/games/input/DirectInputMouse$ButtonsImpl.class
Examining file : net/java/games/input/DirectInputMouse.class
Examining file : net/java/games/input/DirectInputRumbler.class
OS name is: Windows XP
DX8 plugin is supported
OS name is: Windows XP
DX8 plugin is supported
Creating BETOP C318  polling = true
Component count = 3
Component count = 5
Component count = 124
Component count = 11
Offline significantfrank

Senior Newbie





« Reply #14 - Posted 2005-11-09 12:52:28 »

This is the output:
Scanning jar: dxinput.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/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
Adding class to plugins:net.java.games.input.DirectInputEnvironmentPlugin
Examining file : net/java/games/input/DirectInputKeyboard.class
Examining file : net/java/games/input/DirectInputMouse$BallAxis.class
Examining file : net/java/games/input/DirectInputMouse$BallImpl.class
Examining file : net/java/games/input/DirectInputMouse$ButtonImpl.class
Examining file : net/java/games/input/DirectInputMouse$ButtonsImpl.class
Examining file : net/java/games/input/DirectInputMouse.class
Examining file : net/java/games/input/DirectInputRumbler.class
OS name is: Windows XP
DX8 plugin is supported
OS name is: Windows XP
DX8 plugin is supported
Creating BETOP C318  polling = true
Component count = 3
Component count = 5
Component count = 124
Component count = 11
Create effect : DIERR_INVALIDPARAM
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
DI_BUFFEROVERFLOW
Interactive Session Ended
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 (24 views)
2014-12-23 03:34:11

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

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

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

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

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

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

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

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

toopeicgaming1999 (154 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!