我下载了一个 Java 应用程序。但是我在运行脚本时遇到了麻烦。
我试过“java Main”,它应该正确运行“Main.java”?
但我不断得到这个
Exception in thread "main" java.lang.NoClassDefFoundError: Main
这是我的终端尝试:
Last login: Thu Jun 13 17:22:39 on ttys001
new-host:~ jespermadsen$ cd /Users/jespermadsen/Desktop/TimeTakerv2-master
new-host:TimeTakerv2-master jespermadsen$ ls
ChallengeHandler.java SBUtil.java
ConnectToSock.java SendToSock.java
CountTime.java Server part
DownloadFiles.java SocketAction.java
Login.java StrangeBase.java
LoginUI.form TimeTakerRenewedUI.form
LoginUI.java TimeTakerRenewedUI.java
Main.java TingGrabber.java
Protocol.java decodeChallengeString.java
QStringBuffer.java jTokenizer.java
RecieveFromSock.java loginToServer.java
ReplaceHTMLChars.java n7
RequestSites.java
new-host:TimeTakerv2-master jespermadsen$ java Main
Exception in thread "main" java.lang.NoClassDefFoundError: Main
Caused by: java.lang.ClassNotFoundException: Main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)