How to create .jar files?

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

Moderators: roger, 99jonathan, imaqine

Re: How to create .jar files?

Postby Cab » Mon Aug 13, 2012 6:15 pm

Its a shame but it seems that the old error:

Code: Select all
Searching cache file for known Bluetooth devices
Found NXT 0016530929B8 in cache file
Found 1 matching NXTs in cache file
Native Library intelbth_x64 not available
Error: Exception connecting to NXT.
Caused by lejos.pc.comm.NXTCommException: Open of NXT failed.
   at lejos.pc.comm.NXTCommBluecove.open(NXTCommBluecove.java:136)
Caused by javax.bluetooth.BluetoothStateException: BlueCove libraries not available
   at com.intel.bluetooth.BlueCoveImpl.createDetectorOnWindows(BlueCoveImpl.java:896)
Failed to connect to any NXT
Native Library bluecove_x64 not available



Is popping back into the cmd prompt. This error does not happen in the IDE. I am already running both 32 bit Eclipse and 32 bit JDK.

So I restarted the IDE. And exported to .jar again.

The application is now working correctly. I am going to test on other computers now. What considerations do I need before doing this? Are there any files that I need to install for the .jar to run correctly? Thanks for your help skoehler.
Last edited by Cab on Mon Aug 13, 2012 6:20 pm, edited 1 time in total.
Cab
New User
 
Posts: 9
Joined: Mon Aug 13, 2012 5:19 am

Re: How to create .jar files?

Postby skoehler » Mon Aug 13, 2012 6:18 pm

Cab wrote:Its a shame but it seems that the old error:

Code: Select all
Searching cache file for known Bluetooth devices
Found NXT 0016530929B8 in cache file
Found 1 matching NXTs in cache file
Native Library intelbth_x64 not available
Error: Exception connecting to NXT.
Caused by lejos.pc.comm.NXTCommException: Open of NXT failed.
   at lejos.pc.comm.NXTCommBluecove.open(NXTCommBluecove.java:136)
Caused by javax.bluetooth.BluetoothStateException: BlueCove libraries not available
   at com.intel.bluetooth.BlueCoveImpl.createDetectorOnWindows(BlueCoveImpl.java:896)
Failed to connect to any NXT
Native Library bluecove_x64 not available


Is popping back into the cmd prompt. This error does not happen in the IDE.


Well, it depends what JRE is installed. If both a 32Bit and 64Bit JRE is installed, I bet that the java-command defaults to the 64Bit JRE.
Unfortunately, you cannot specify (in the manifest or elsewhere in the JAR file) whether 32Bit or 64Bit is to be preferred. It just uses, whatever is the default.
One solution is to specify the full to java.exe:

"c:\program file (x86)\java\jre7\bin\java.exe" -jar "path/to/your/file.jar"
skoehler
leJOS Team Member
 
Posts: 1115
Joined: Thu Oct 30, 2008 4:54 pm

Previous

Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

cron
more stuff