I am in a very basic class, and reviewed through the TREMENDOUSLY LARGE book, anyone help?
There are suppose to be 5 syntax errors in this short code, I ran the debugger and couldn't find them.
public class LetUsDebug{
public static void main(String[] args){
int height = 3; width;
width=4
System.out.Println("Area = " \t +
height * width);
}
::BUMP::
I attempted to compile, knowing it was faulty.
This is what was returned to me, can anyone explain, my teacher has a VERY hands off approach.
----jGRASP exec: java -Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,suspend=y,server=y LetUsDebug
----jGRASP: connected to debugger.
java.lang.NoClassDefFoundError: LetUsDebug
Caused by: java.lang.ClassNotFoundException: LetUsDebug
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: LetUsDebug. Program will exit.
Exception in thread "main" ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2
JDWP exit error AGENT_ERROR_NO_JNI_ENV(183): [../../../src/share/back/util.c:820]
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
Question
Alladaskill17
I am in a very basic class, and reviewed through the TREMENDOUSLY LARGE book, anyone help?
There are suppose to be 5 syntax errors in this short code, I ran the debugger and couldn't find them.
public class LetUsDebug{ public static void main(String[] args){ int height = 3; width; width=4 System.out.Println("Area = " \t + height * width); }::BUMP::
I attempted to compile, knowing it was faulty.
This is what was returned to me, can anyone explain, my teacher has a VERY hands off approach.
Link to comment
Share on other sites
11 answers to this question
Recommended Posts