This question already has answers here:
why wrong name with NoClassDefFoundError
                                
                                    (3个答案)
                                
                        
                                5年前关闭。
            
                    
我在这里有GreetingClient课:

C:\Users\khoy\Desktop\IntelliJ IDEA Projects\src\Networking

当我在命令行中通过键入java GreetingClient(在javac GreetingClient.java之后)尝试它时,它会生成错误(如下面的屏幕快照所示):

最佳答案

上一层执行java Networking.GreetingClient



注意


您的包裹命名与约定不符


看到


package naming convention
java package

关于java - NoClassDefFoundError,如何解决? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22275520/

10-11 04:32