WiiLi Wiki frontpage Include your post in the News Get links Hoteles Quito
WiiLi.org Forum Index WiiLi.org
a new revolution
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need help with Java and the wiimote.
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ
View previous topic :: View next topic  
Author Message
SilentShaddow



Joined: 10 Feb 2008
Posts: 33

Digg It
PostPosted: 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
View user's profile Send private message
lamoua76



Joined: 24 Dec 2007
Posts: 14

Digg It
PostPosted: 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
View user's profile Send private message
SilentShaddow



Joined: 10 Feb 2008
Posts: 33

Digg It
PostPosted: 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
View user's profile Send private message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 470

Digg It
PostPosted: 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
View user's profile Send private message
SilentShaddow



Joined: 10 Feb 2008
Posts: 33

Digg It
PostPosted: Thu Feb 21, 2008 12:59 pm    Post subject:

oh dear....

Crying or Very sad

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
View user's profile Send private message
SilentShaddow



Joined: 10 Feb 2008
Posts: 33

Digg It
PostPosted: 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
View user's profile Send private message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 470

Digg It
PostPosted: Tue Feb 26, 2008 8:45 pm    Post subject:

Wait, what? Why do you need C?
_________________
Cha0s
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    WiiLi.org Forum Index -> WiiremoteJ All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group