javax/bluetooth/DiscoveryListener?

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: 99jonathan, roger, imaqine

javax/bluetooth/DiscoveryListener?

Postby woody » Tue Mar 04, 2008 5:19 pm

why i can run javac NXJTest.java
but i can't run java NXJTest

JAVA_HOME=C:\Program Files\Java\jdk1.6.0_03
NXJ_HOME=G:\NXT\lejos_nxj
Path=%JAVA_HOME%\bin;%NXJ_HOME%\bin;
CLASSPATH=.;NXJ_HOME%/3rdparty/lib/bluecove.jar;G:\NXT\icommand\dist\icommand.jar;

G:\NXT\icommand\dist>javac NXJTest.java

G:\NXT\icommand\dist>java NXJTest
Properties location: G:\NXT\icommand\dist\icommand.properties
No NXT address found in icommand.properties. Searching... (this may take up to a
minute)
Exception in thread "main" java.lang.NoClassDefFoundError: javax/bluetooth/Disco
veryListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at icommand.nxt.comm.NXTCommFactory.createInstance(Unknown Source)
at icommand.nxt.comm.NXTCommand.open(Unknown Source)
at NXJTest.main(NXJTest.java:9)
woody
New User
 
Posts: 3
Joined: Tue Mar 04, 2008 5:12 pm

Postby PatrickLismore » Tue Mar 04, 2008 8:46 pm

Do you have the "icommand.properties" file in your project folder and have you set your Bluetooth Address and port , or if your using the toshiba bluetooth stack you will need to configure RXTX

I see your using javac

Can you use Eclipse ,

create a project, package and then add your classes and the icommand.properties file to your project. dont forget the jar files.

I have never used java at the console window some people do and like it i personally prefer to use an IDE like eclipse
User avatar
PatrickLismore
Active User
 
Posts: 81
Joined: Tue Oct 16, 2007 7:28 pm
Location: Prague

Postby woody » Wed Mar 05, 2008 9:09 am

well ..
How do I establish my RXTX'S CLASSPATH or PATH?
May give an example?

Although I have looked the icommand's read file, but I don't know how to set the CLASSPATH .
woody
New User
 
Posts: 3
Joined: Tue Mar 04, 2008 5:12 pm

Postby PatrickLismore » Wed Mar 05, 2008 9:34 pm

soon as i get home give you a couple of screen shot examples
User avatar
PatrickLismore
Active User
 
Posts: 81
Joined: Tue Oct 16, 2007 7:28 pm
Location: Prague


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

cron
more stuff