| View previous topic :: View next topic |
| Author |
Message |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 449
Digg It |
Posted: Thu Feb 28, 2008 4:55 pm Post subject: |
|
|
javac -cp WiiRemoteJ.jar;BlueCove.jar DMXControl.java
java -cp WiiRemoteJ.jar;BlueCove.jar;. DMXControl
Note that this assumes both WiiRemoteJ and BlueCove are in the same directory as DMXControl.java. If you want them in separate directories, you must specify the full path. Alternatively, you could add them to the extensions folder of your Java distribution as mentioned in the WiiRemoteJ README. However, for now, I'd just try it with the classpath (cp) command.
Oh, and you don't need a semi-colon (;) after your main method (you do need one after the listener declaration, though.) _________________ Cha0s |
|
| Back to top |
|
 |
SilentShaddow
Joined: 10 Feb 2008 Posts: 33
Digg It |
Posted: Thu Feb 28, 2008 5:08 pm Post subject: |
|
|
| Code: | C:\Users\Toby\Downloads\WiiRemoteJ\WiiRemoteJ_v1.2>javac -cp WiiRemoteJ.jar;Blue
Cove.jar DMXControl.java
DMXControl.java:1: package WiiRemoteJ does not exist
import WiiRemoteJ.jar;
^
DMXControl.java:7: cannot find symbol
symbol : class WiiRemote
location: class DMXControl
WiiRemote remote = WiiRemoteJ.findRemote();
^
DMXControl.java:7: cannot find symbol
symbol : variable WiiRemoteJ
location: class DMXControl
WiiRemote remote = WiiRemoteJ.findRemote();
^
3 errors
|
|
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 449
Digg It |
Posted: Thu Feb 28, 2008 7:56 pm Post subject: |
|
|
Nono. Your imports are wrong.
import wiiremotej.*;
import wiiremotej.event.*; _________________ Cha0s |
|
| Back to top |
|
 |
SilentShaddow
Joined: 10 Feb 2008 Posts: 33
Digg It |
Posted: Thu Feb 28, 2008 8:34 pm Post subject: |
|
|
!
that worked alot better but then crashed when I excuted it, (with wiiremote connected I add). I changed the code slightly:
It just says 1 then the binary thingy crashes
| Code: | import wiiremotej.*;
import wiiremotej.event.*;
public class DMXControl
{
public static void main(String args[]) throws Exception
{
System.out.println("1");
WiiRemote remote = WiiRemoteJ.findRemote();
remote.setLEDIlluminated(0, true);
WiiRemoteAdapter listener = new WiiRemoteAdapter()
{
public void buttonInputReceived(WRButtonEvent evt)
{
if (evt.wasPressed(WRButtonEvent.B))
{
System.out.println("2");
}
}
};
remote.addWiiRemoteListener(listener);
System.out.println("3");
};
} |
|
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 449
Digg It |
Posted: Thu Feb 28, 2008 8:40 pm Post subject: |
|
|
What error message do you get? _________________ Cha0s |
|
| Back to top |
|
 |
SilentShaddow
Joined: 10 Feb 2008 Posts: 33
Digg It |
Posted: Thu Feb 28, 2008 8:51 pm Post subject: |
|
|
The CMD doesnt give a message, just returns to the command line, what does happen is windows pops up and says:
Java(TM) platform SE binary has stopped working
it collects all the info and sends it to microsoft... that thingy |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 449
Digg It |
Posted: Thu Feb 28, 2008 9:05 pm Post subject: |
|
|
Are you running it from the command-line? If you run it from the command-line, you should get full feedback. _________________ Cha0s |
|
| Back to top |
|
 |
|