I'm trying to use the JavaBluetooth Api with ecplise, but I've got a probleme.
The first thing i make is :
HCIDriver.init(new UARTTransport("serial0"));
Then, when I run, i've got this error message :
java.lang.Error: Unresolved compilation problems:
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
SerialPortEventListener cannot be resolved or is not a valid superinterface
CommPortIdentifier cannot be resolved or is not a type
CommPortIdentifier cannot be resolved
CommPortIdentifier cannot be resolved
SerialPort cannot be resolved or is not a type
SerialPort cannot be resolved
SerialPort cannot be resolved
SerialPort cannot be resolved
NoSuchPortException cannot be resolved or is not a type
SerialPortEvent cannot be resolved (or is not a valid type) for the argument event of the method serialEvent
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.javabluetooth.stack.hci.UARTTransport.<init>(UARTTransport.java:25)
at Test.main(Test.java:34)
Exception in thread "main"
I imported the comm.jar, so i don't understand why javax.comm cannot be resolved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all you have to copy the comm.jar, javax.comm.properties and win32com.dll in your project folder. Than add the comm.jar as Library (by using "Libraries->Add JARs" in the project properties) to the "Java Build Path"
Now everything should work.
Hint: by using Windows you have to use "HCIDriver.init(new UARTTransport("COM1"));" or any other COM-Port
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!!!
I have the same problem. I tried your solution but the problem is the same.
I really don't know what to do...
If anybody has another solution, thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to use the JavaBluetooth Api with ecplise, but I've got a probleme.
The first thing i make is :
HCIDriver.init(new UARTTransport("serial0"));
Then, when I run, i've got this error message :
java.lang.Error: Unresolved compilation problems:
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
The import javax.comm cannot be resolved
SerialPortEventListener cannot be resolved or is not a valid superinterface
CommPortIdentifier cannot be resolved or is not a type
CommPortIdentifier cannot be resolved
CommPortIdentifier cannot be resolved
SerialPort cannot be resolved or is not a type
SerialPort cannot be resolved
SerialPort cannot be resolved
SerialPort cannot be resolved
NoSuchPortException cannot be resolved or is not a type
SerialPortEvent cannot be resolved (or is not a valid type) for the argument event of the method serialEvent
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.javabluetooth.stack.hci.UARTTransport.<init>(UARTTransport.java:25)
at Test.main(Test.java:34)
Exception in thread "main"
I imported the comm.jar, so i don't understand why javax.comm cannot be resolved.
First of all you have to copy the comm.jar, javax.comm.properties and win32com.dll in your project folder. Than add the comm.jar as Library (by using "Libraries->Add JARs" in the project properties) to the "Java Build Path"
Now everything should work.
Hint: by using Windows you have to use "HCIDriver.init(new UARTTransport("COM1"));" or any other COM-Port
Hello!!!
I have the same problem. I tried your solution but the problem is the same.
I really don't know what to do...
If anybody has another solution, thank you