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 !!
精彩评论