jbluez not found

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

Moderators: 99jonathan, roger, imaqine

jbluez not found

Postby wyojustin » Sun Jul 29, 2007 1:08 am

I am having trouble loading the HelloWorld.class onto the nxt. It
seems jbluez is not properly configured.

Here are my system varables:

justin@justin-laptop:~/Desktop/samples/HelloWorld$ echo $CLASSPATH
/usr/local/jbluez/bin/jbluez.jar
justin@justin-laptop:~/Desktop/samples/HelloWorld$ echo $LD_LIBRARY_PATH
/usr/local/jbluez/bin/

When I try to load the class file I get this:

justin@justin-laptop:~/Desktop/samples/HelloWorld$ nxj HelloWorld
Linking...
Uploading...
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jbluez in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at lejos.pc.comm.NXTCommBluez.<clinit>(NXTCommBluez.java:12)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at lejos.pc.comm.NXTCommand.search(NXTCommand.java:63)
at lejos.pc.tools.Upload.upload(Upload.java:26)
at lejos.pc.tools.NXJLinkAndUpload.run(NXJLinkAndUpload.java:97)
at lejos.pc.tools.NXJLinkAndUpload.main(NXJLinkAndUpload.java:27)

TIA
Justin
________
Indica Strains
Last edited by wyojustin on Mon Feb 14, 2011 4:02 pm, edited 1 time in total.
wyojustin
New User
 
Posts: 6
Joined: Mon Jul 23, 2007 12:39 am

Postby CoBB » Sun Jul 29, 2007 6:33 am

Setting $NXJ_HOME to the leJOS home directory and adding $NXJ_HOME/bin to the $PATH should be enough. The rest is handled by nxj.
User avatar
CoBB
Novice
 
Posts: 73
Joined: Tue Apr 24, 2007 12:24 pm

I've got those variables set too

Postby wyojustin » Sun Jul 29, 2007 12:09 pm

I've got NXJ_HOME and PATH correct I believe, still no joy.

justin@justin-laptop:~$ echo $NXJ_HOME
/usr/local/lejos_nxj
justin@justin-laptop:~$ echo $PATH
/usr/local/apache-ant-1.7.0/bin:/usr/local/lejos_nxj/bin:/usr/local/jdk1.6.0_01/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
justin@justin-laptop:~$ cd Desktop/
justin@justin-laptop:~/Desktop$ cd samples/HelloWorld/
justin@justin-laptop:~/Desktop/samples/HelloWorld$ nxj HelloWorld
Linking...
Uploading...
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jbluez in java.library.path
.
.
.
________
Vaporizer pipe
Last edited by wyojustin on Mon Feb 14, 2011 4:02 pm, edited 1 time in total.
wyojustin
New User
 
Posts: 6
Joined: Mon Jul 23, 2007 12:39 am

Postby CoBB » Sun Jul 29, 2007 1:05 pm

And this happens after successfully building the release with ant?
User avatar
CoBB
Novice
 
Posts: 73
Joined: Tue Apr 24, 2007 12:24 pm

Good catch.

Postby wyojustin » Sun Jul 29, 2007 3:07 pm

I commented out the jbluez stuff to get the rest to compile. When I got jblues, I forgot to run ant again.

Now I can't get jbluez to compile. When I add the path to bluetooth.bluetooth.h I only go further down the rat hole.

Is this easier to set up on XP?



root@justin-laptop:/usr/local/lejos_nxj/build# ant
Buildfile: build.xml

clean:
[echo] saving existing files to .bak files
[move] Moving 3 files to /usr/local/lejos_nxj/bin

libnxt:

clean:

libnxt:
[cc] 5 total files to be compiled.
[cc] Starting link
[cc] ar: creating libnxt.a
[cc] a - samba.o
[cc] a - flash.o
[cc] a - error.o
[cc] a - lowlevel.o
[cc] a - firmware.o

nxjflash:
[cc] 1 total files to be compiled.
[cc] Starting link

jlibnxt:
[cc] 1 total files to be compiled.
[cc] /usr/local/lejos_nxj/src/libnxt/main_jlibnxt.c: In function ?Java_lejos_pc_comm_NXTCommLibnxt_jlibnxt_1read_1data?:
[cc] /usr/local/lejos_nxj/src/libnxt/main_jlibnxt.c:104: warning: assignment from incompatible pointer type
[cc] /usr/local/lejos_nxj/src/libnxt/main_jlibnxt.c:105: warning: passing argument 2 of ?(*env)->SetByteArrayRegion? from incompatible pointer type
[cc] /usr/local/lejos_nxj/src/libnxt/main_jlibnxt.c:106: warning: return from incompatible pointer type
[cc] Starting link

make:

jbluez:

clean:

jbluez:
[cc] 1 total files to be compiled.
[cc] /usr/local/lejos_nxj/src/jbluez/jbluez.c:8:33: error: bluetooth/bluetooth.h: No such file or directory
[cc] /usr/local/lejos_nxj/src/jbluez/jbluez.c:9:27: error: bluetooth/hci.h: No such file or directory
[cc] /usr/local/lejos_nxj/src/jbluez/jbluez.c:10:31: error: bluetooth/hci_lib.h: No such file or directory
<<SNIP>>

BUILD FAILED
/usr/local/lejos_nxj/build/build.xml:71: The following error occurred while executing this line:
/usr/local/lejos_nxj/src/jbluez/build.xml:42: gcc failed with return code 1

Total time: 1 second
root@justin-laptop:/usr/local/lejos_nxj/build# find / -name "bluetooth.h"
/usr/src/linux-headers-2.6.20-15/include/net/bluetooth/bluetooth.h
/usr/src/linux-headers-2.6.20-16/include/net/bluetooth/bluetooth.h
________
Honda S-wing history
Last edited by wyojustin on Mon Feb 14, 2011 4:02 pm, edited 1 time in total.
wyojustin
New User
 
Posts: 6
Joined: Mon Jul 23, 2007 12:39 am

Postby 99jonathan » Sun Jul 29, 2007 4:42 pm

yea, i believe it is... :wink:
99jonathan
Moderator
 
Posts: 122
Joined: Thu Mar 01, 2007 5:30 am

Re: Good catch.

Postby CoBB » Sun Jul 29, 2007 4:50 pm

wyojustin wrote:I commented out the jbluez stuff to get the rest to compile. When I got jblues, I forgot to run ant again.

Now I can't get jbluez to compile. When I add the path to bluetooth.bluetooth.h I only go further down the rat hole.

Is this easier to set up on XP?

I’m using Debian Sid myself. I didn’t need to configure or modify anything by hand, just apt-get install the dependencies, and it built without a single error out of the box. Also tried it on a freshly installed Ubuntu, and the result was the same.
User avatar
CoBB
Novice
 
Posts: 73
Joined: Tue Apr 24, 2007 12:24 pm


Return to NXJ Software

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest

more stuff