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
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 449

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



Joined: 10 Feb 2008
Posts: 33

Digg It
PostPosted: Thu Feb 28, 2008 5:08 pm    Post subject:

Sad

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


Joined: 17 Jan 2007
Posts: 449

Digg It
PostPosted: Thu Feb 28, 2008 7:56 pm    Post subject:

Nono. Your imports are wrong. Wink

import wiiremotej.*;
import wiiremotej.event.*;
_________________
Cha0s
Back to top
View user's profile Send private message
SilentShaddow



Joined: 10 Feb 2008
Posts: 33

Digg It
PostPosted: Thu Feb 28, 2008 8:34 pm    Post subject:

!
that worked alot better Razz 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
View user's profile Send private message
Cha0s
Site Admin


Joined: 17 Jan 2007
Posts: 449

Digg It
PostPosted: Thu Feb 28, 2008 8:40 pm    Post subject:

What error message do you get?
_________________
Cha0s
Back to top
View user's profile Send private message
SilentShaddow



Joined: 10 Feb 2008
Posts: 33

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


Joined: 17 Jan 2007
Posts: 449

Digg It
PostPosted: 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
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 4 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