| View previous topic :: View next topic |
| Author |
Message |
thohai
Joined: 17 Dec 2007 Posts: 1 Location: Austria
Digg It |
Posted: Mon Dec 17, 2007 1:34 pm Post subject: WiiRemoteJ without X Server?? |
|
|
Hi,
Sorry but I did not find any posts to this topic:
I want to use WiiRemoteJ on a computer that has no mouse and no x-server attached to it...
my problem is the following: when i call findRemote() the following exception is thrown:
| Code: |
Dec 17, 2007 4:19:50 PM wiiremotej.WiiRemote processButtonMapEvents
WARNING: Error moving mice.
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.MouseInfo.getPointerInfo(MouseInfo.java:57)
at wiiremotej.WiiRemote.processButtonMapEevents(WiiRemote.java:560)
at wiiremotej.WiiRemote$1.run(WiiRemote.java:426)
at java.lang.Thread.run(Thread.java:619)
....
which is then followed by a java.lang.NullPointerException
at wiiremotej.WiiRemote.processButtonMapEvents(WiiRemote.java:572)
....
...
|
is there any possibility to use the wiimote without having an xserver and a mouse up and running?
I only want to use the buttons as a remotecontrol to this computer
greets & thx in advance
thohai |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 449
Digg It |
Posted: Tue Dec 18, 2007 4:52 am Post subject: |
|
|
Interesting. I had not foreseen this use. Hrmm. Tell me the result of the following code and I'll see if I can come up with something.
| Code: |
import java.awt.GraphicsEnvironment;
public class EnvironmentTest
{
public static void main(String args[])
{
System.out.println(GraphicsEnvironment.isHeadless());
System.out.println(GraphicsEnvironment.getLocalGraphicsEnvironment().isHeadlessInstance());
}
}
|
_________________ Cha0s |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 449
Digg It |
Posted: Thu Dec 27, 2007 3:01 am Post subject: |
|
|
Update: I've put something in that should allow you to do this. Please tell me how it works! If there are more errors, throw them at me and I'll see what I can do to fix them. You'll have to use a new constructor I added. Check the API for details. _________________ Cha0s |
|
| Back to top |
|
 |
16c
Joined: 27 Mar 2008 Posts: 1
Digg It |
Posted: Thu Mar 27, 2008 1:24 pm Post subject: |
|
|
Hi,
I tried the code.(Debian 4.0)
result:
$ java EnvironmentTest
true
true |
|
| Back to top |
|
 |
|