在eclipse上安装JSR-82

时间:2014-03-10 09:22:58

标签: java api bluetooth install

我正在使用Eclipse IDE for Java Developers 我只是想运行这个程序,但我不能:/

import javax.bluetooth.*;
import javax.microedition.io.*;
import com.atinav.BCC;

public class WirelessDevice implements DiscoveryListener {
LocalDevice localDevice = null; 

public WirelessDevice (){ 
    //setting the port number using Atinav's BCC
    BCC.setPortName("COM1"); 

    //setting the baud rate using Atinav's BCC
    BCC.setBaudRate(57600);

    //connectable mode using Atinav's BCC
    BCC.setConnectable(true);

    //Set discoverable mode using Atinav's BCC 
    BCC.setDiscoverable(DiscoveryAgent.GIAC); 

    try{
        localDevice = LocalDevice.getLoaclDevice(); 
    }
    catch (BluetoothStateException exp) {
    }

    // implementation of methods in DiscoveryListener class
    // of javax.bluetooth goes here

    // now do some work
}



}

我安装了JME Wireless Toolkit 2.2,但这不是我想要的。

我只是想让我的Java程序与蓝牙设备建立连接。

那么有人可以解释如何安装jsr-82中包含的javax.bluetooth API吗?

0 个答案:

没有答案