//: 2-1.java import java.util.*;/** The first Excese * Displays a string and today's date. * @author Rockay * @version 2.0 */ public class HelloJava{ /** Sole entry point to class & application * @param args array of string arguments * @return No return value * @exception exceptions NO exceptions thrown */ public static void main(String[] args){ System.out.println("HelloJava"); System.out.println(new Date()); } }///:~
import java.util.*;/** The first Excese
* Displays a string and today's date.
* @author Rockay
* @version 2.0
*/
public class HelloJava{
/** Sole entry point to class & application
* @param args array of string arguments
* @return No return value
* @exception exceptions NO exceptions thrown
*/
public static void main(String[] args){
System.out.println("HelloJava");
System.out.println(new Date());
}
}///:~
然后想运行一下就是出错
显示“Exception in thread "main" java.lang.NoClassDefFoundError: hellojava/exe”
如果大小写一致了还有问题,就是classpath没有设置好了。