开发者

Bluetooth does not run in window PC

开发者 https://www.devze.com 2023-03-24 00:40 出处:网络
hi i write a java app about bluetooth when i run in eclipse console it ran ok but when i run in command line it occur error

hi i write a java app about bluetooth when i run in eclipse console it ran ok but when i run in command line it occur error import javax.bluetooth.BluetoothStateException; import javax.bluetooth.LocalDevice;

public class main {

/**
 * @param args
 * @throws BluetoothStateException 
 */
public static void main(String[] args) throws BluetoothStateException {
    // TODO Auto-generated method stub
    LocalDevice local=null;
    local = LocalDevice.getLocalDevice();
    System.out.printf("this is some text");
}

}

errors occur

C:\Users\HUNGSON\workspace\Java_Test\bin>java main
Exception in thread "main" java.lang.NoClassDefFoundError: main
Caused by: java.lang.ClassNotFoundException: main
        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)
Could not find the main class: main. 开发者_如何学编程 Program will exit.

please help me !!

0

精彩评论

暂无评论...
验证码 换一张
取 消