Note: For lab times goto [TA's & Tutors] page.
.gpue_path
(don't miss that dot at the start of that file name) and put
the following line in the file:
setenv CLASSPATH .:/afs/cats.ucsc.edu/users/s/mcdowell/java/publicDon't miss the first two characters of the path which are dot colon. Make sure there is a newline at the end of the line. Put the file in your home directory. The first time you will need to log out and back in, or just type:
source .gpue_path
If your program is throwing an exception and the message gives you a stack trace but it says "compiled code" instead of showing you the line numbers of where you were in your program, trying running your program with the command:
java -Djava.compiler=NONE YourClassFile
To start debugging your program first compile it with "javac -g MyProg.java". Notice the "-g" flag. This causes the compiler to insert debugging information. Then type
jdb MyProg
stop in MyProg:main
run
list
This should show you the first few lines of your program, with an arrow
pointing at the first executable statement in main().
Type help to get a complete list of debugger commands. Here are a few.
For more information view Sun's documentation for jdb.