exception in thread 'main' java.lang.NoClassDefFoundError:

后端 未结 23 3566
心在旅途
心在旅途 2020-11-28 06:27

The following program is throwing error:

public class HelloWorld {
    public static void main(String args[]) {
        System.out.println(\"Hello World!\");         


        
23条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 06:46

    Your CLASSPATH needs to know of the location of your HelloWorld class also.

    In simple terms you should append dot . (means current directory) in the CLASSPATH if you are running javac and java commands from DOS prompt.

提交回复
热议问题