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

后端 未结 23 3572
心在旅途
心在旅途 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:34

    I finally found this as a bug with Apache Netbeans editor:

    Below steps will remove the error:

    1. Rename the filename & class to Abc
    2. Close the editor
    3. Reopen the editor
    4. Rename the filename & class, from Abc, back to the previous name
    5. Now debug project (Ctrl+F5) works fine

    Hope that helps, if you are using new Apache Netbeans (not old Netbeans)

提交回复
热议问题