jGRASP Setup:
Step 1: Download and Install Java JDK 6
Note: Be sure to Un-install any previous versions of Java on your machine first!!!Go to this web page: http://java.sun.com/javase/downloads/index.jsp
Click on 'Download' button by 'JDK 6'
You will have to click 'Accept' in the agreement, then you can choose your download. If you have a PC, you will probably want the first group (Windows platform). You can choose whether to use their online installation or offline installation- either one will work. The only difference is that the online install will download files during the installation, while the offline downloads all files before the installation.
While Java is downloading, you may want to get Mozilla Firefox for your PC. We will be making applets, which display through a web browser, and I (personally) have had better luck using Mozilla. Mozilla should be installed before you install Java, so that it can set up the Java Runtime Environment (JRE) in all of your browsers. Mozilla Firefox can be downloaded from www.mozilla.org.
After downloading, run the installer on your machine- this will install the Java platform to your hard drive. Follow the instructions- the installer should ask towards the end which browser to set up its Virtual Machine / Java Run Time Environment (JRE) - make sure you allow it to do this on the browser(s) you will be using for the class- it will save you problems later on. (Your assignments will be tested in a browser).
Step 2: Download and Install jGRASP
Go to this webpage: http://spider.eng.auburn.edu/user-cgi/grasp/grasp.pl?;dl=download_jgrasp.html
If you have Windows, Click on the 'jGRASP exe' button. On this page, you can download jGRASP for other operating systems such as Mac OS if that is what you have. The download page will look something like this (version number will be higher):
After downloading, run the installer and install jGRASP to your system. Remember to make sure you have already installed the Java SDK (Step 1).
Step 3: Starting a new program in jGRASP
Open up the jGRASP program, and go to the 'File' menu -> New -> Java:
Then you will get a new window in the workspace for you to type in your Java Program.
When you are ready to compile your code, go to the 'Build' menu and click on 'Compile', which will then attempt to compile your program. Error messages will appear at the bottom of the screen, as seen above. You can also compile by clicking the green '+' icon.
To run your program, go back to the 'Build' menu, then click 'Run'. Your program will run in the window at the bottom of the screen in the same window you receive error messages- and will only run the program if it has compiled properly. You can also run the program by clicking the red 'running man' icon, next to compile.
Feel free to play around with the buttons and options in jGRASP so you can get a feel for what they do. Some options can do things like show the line numbers and allow you to trace through the logic of your code, which can be very helpful when you are debugging errors in your program.
At this point, you are ready to write programs using jGRASP!
Any questions, please contact your TA