| View previous topic :: View next topic |
| Author |
Message |
SilentShaddow
Joined: 10 Feb 2008 Posts: 33
Digg It |
Posted: Mon Feb 18, 2008 5:54 am Post subject: |
|
|
That did help, but I hate to be a pain:
| Code: | | Exception in thread "main" java.lang.NoClassDefFoundError: wiiremotej/event/WiiRemoteListener |
im running the code from the ../WiiRemoteJ/WiiremoteJ v1.2 as I thought it might help.
atm the code looks something like (it hasnt changed alot)
| Code: |
import wiiremotej.*;
import wiiremotej.event.*;
public class DMXControl{
public static void main(String args[]) throws Exception
{
WiiRemote remote = WiiRemoteJ.findRemote();
remote.setLEDIlluminated(0, true);
WiiRemoteAdapter listener = new WiiRemoteAdapter()
{
public void buttonInputReceived(WRButtonEvent evt)
{
if (evt.wasPressed(WRButtonEvent.B));//<-will the if statement work as I described above?
//do something! a generalised statement for getting the inputs?
}
};
remote.addWiiRemoteListener(listener);
}
} |
|
|
| Back to top |
|
 |
lamoua76
Joined: 24 Dec 2007 Posts: 14
Digg It |
Posted: Mon Feb 18, 2008 11:16 am Post subject: |
|
|
| SilentShaddow wrote: | That did help, but I hate to be a pain:
| Code: | | Exception in thread "main" java.lang.NoClassDefFoundError: wiiremotej/event/WiiRemoteListener |
im running the code from the ../WiiRemoteJ/WiiremoteJ v1.2 as I thought it might help.
|
try something like java -cp WiiRemoteJ.jar;. your_class in Windows xp or java -cp WiiRemoteJ.jar:. your_class on Linux |
|
| Back to top |
|
 |
SilentShaddow
Joined: 10 Feb 2008 Posts: 33
Digg It |
Posted: Wed Feb 20, 2008 12:59 am Post subject: |
|
|
Its me again, I think that helped, maybe as I get a different error now:
| Code: |
Exception in thread "main" java.lang.NoClassDefFoundError: javax/bluetooth/Disco
veryListener
at DMXControl.main(DMXControl.java:18) |
To recap:
| Code: |
import java.lang.Math.*;
import java.text.*;
import java.util.*;
import java.lang.Object.*;
import wiiremotej.*;
import wiiremotej.event.*;
public class DMXControl
{
public static void main(String args[]) throws Exception
{
WiiRemote remote = WiiRemoteJ.findRemote();
remote.setLEDIlluminated(0, true);
WiiRemoteAdapter listener = new WiiRemoteAdapter()
{
public void buttonInputReceived(WRButtonEvent evt)
{
if (evt.wasPressed(WRButtonEvent.B))
{
int x=0;
System.out.println("yay1="+x);
}
}
};
remote.addWiiRemoteListener(listener);
};
} |
at this location: C:\Users\Toby\Downloads\WiiremoteJ\Wiiremotej v1.2\ which also has said WiiremoteJ.jar file in it. I think thats all the info I can give.
im Toby btw, help much appreiated. |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 470
Digg It |
Posted: Wed Feb 20, 2008 2:28 am Post subject: |
|
|
You now need to add JSR-82 to your classpath (the same way you added WiiRemoteJ mentioned in the last post). _________________ Cha0s |
|
| Back to top |
|
 |
SilentShaddow
Joined: 10 Feb 2008 Posts: 33
Digg It |
Posted: Thu Feb 21, 2008 12:59 pm Post subject: |
|
|
oh dear....
erm thats proving tricky atm. Ill give you guys at update in a bit when Ive got to a point where I can ask for help.... :S |
|
| Back to top |
|
 |
SilentShaddow
Joined: 10 Feb 2008 Posts: 33
Digg It |
Posted: Tue Feb 26, 2008 7:11 pm Post subject: |
|
|
| It would appear that to output the signal in question I need to do it from C or C++, im wondering if completing the entire thing in C would be easier? rather than then completeing the program in java and then loading that into C. |
|
| Back to top |
|
 |
Cha0s Site Admin
Joined: 17 Jan 2007 Posts: 470
Digg It |
Posted: Tue Feb 26, 2008 8:45 pm Post subject: |
|
|
Wait, what? Why do you need C? _________________ Cha0s |
|
| Back to top |
|
 |
|