Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (517)
Games in Android Showcase (123)
games submitted by our members
Games in WIP (577)
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 plugin error  (Read 2616 times)
0 Members and 1 Guest are viewing this topic.
Offline starlord

Junior Duke





« Posted 2003-06-21 11:52:28 »

i'm using mind2machine compiled binary of jinput.

i get error with following code
1  
2  
3  
4  
5  
6  
7  
8  
ControllerEnvironment ce =
                  ControllerEnvironment.getDefaultEnvironment();
            Controller[] ca = ce.getControllers();
            for (int i = 0; i < ca.length; i++)
            {
                  Controller cont = ca[i];
                  System.out.println(cont.getName());
            }

and error is
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
java.lang.NullPointerException
        at net.java.games.util.plugins.Plugins.scanPlugins(Plugins.java:78)
        at net.java.games.util.plugins.Plugins.<init>(Plugins.java:73)
        at net.java.games.input.DefaultControllerEnvironment.scanControllersAt(D
efaultControllerEnvironment.java:170)
        at net.java.games.input.DefaultControllerEnvironment.scanControllers(Def
aultControllerEnvironment.java:162)
        at net.java.games.input.DefaultControllerEnvironment.access$000(DefaultC
ontrollerEnvironment.java:57)
        at net.java.games.input.DefaultControllerEnvironment$1.run(DefaultContro
llerEnvironment.java:108)
        at java.security.AccessController.doPrivileged(Native Method)
        at net.java.games.input.DefaultControllerEnvironment.getControllers(Defa
ultControllerEnvironment.java:106)


what's causing this?

i'm currently trying to build jinput with mingw but the project main page say's that i need dx8lib's but doesn't say where to put them,also i'm quite lost how to get the native code to build,root ant build file doesn't do that.
Offline Jeff

JGO Coder




Got any cats?


« Reply #1 - Posted 2003-06-23 13:34:48 »

Put PeterPuck's librarys in the MinGW lib directory.  Ill check my system at work today and give you and exact path.

The Ant file *should* build the DLL under MinGW(it does for me...)  If you are going to use a different environment you will likely have to muck with it.

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 Jeff

JGO Coder




Got any cats?


« Reply #2 - Posted 2003-06-23 13:37:09 »

BTW...

At a guess this is ocurring because you don't have a controller
directory that contains the plugin beneath your execution directory and/or in your <java>/lib directory.

Having said that it should fail more gracefully.
I'll look at the plug-in code and see about fixing that.

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
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jeff

JGO Coder




Got any cats?


« Reply #3 - Posted 2003-06-25 00:22:17 »

Yep.  Definiately needed some improvement in its error handling.

Upate coming tomorrow after I make sure everything still works.

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 Jeff

JGO Coder




Got any cats?


« Reply #4 - Posted 2003-06-25 22:13:22 »

Okay.

New version is up that will ignore a missing "controller" plug-in directory and just run with the built in support. (Which in this case is a null set, I believe.)


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
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.

TehJavaDev (35 views)
2014-10-27 03:28:38

TehJavaDev (28 views)
2014-10-27 03:27:51

DarkCart (42 views)
2014-10-26 19:37:11

Luminem (23 views)
2014-10-26 10:17:50

Luminem (28 views)
2014-10-26 10:14:04

theagentd (34 views)
2014-10-25 15:46:29

Longarmx (62 views)
2014-10-17 03:59:02

Norakomi (60 views)
2014-10-16 15:22:06

Norakomi (49 views)
2014-10-16 15:20:20

lcass (44 views)
2014-10-15 16:18:58
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!