你好我写了一个关于蓝牙的java应用程序 当我在eclipse控制台中运行它运行正常 但是当我在命令行中运行它会发生错误 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");
}
}
发生错误
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.
请帮助我!!