Software Instructions:
How to Edit, Compile, and Run Java Programs on jGRASP


Step #1: Download JDK (Java Development Kit)

  1. Go to this website: Java SE Downloads
  2. Click on the DOWNLOAD button under JDK.
    Java SE Downloads
  3. The webpage will change to the Java SE Development Kit 8 Downloads webpage.
  4. Just below Java SE Development Kit 8u111, click on the radio button Accept License Agreement.
    Java SE Development Kit 8u111
  5. Based on your computer's operating system, click the appropriate download on the right-hand column.
    Download
  6. Save the executable file.
    Save File
  7. Open and run the executable file.
  8. Follow the instructions on the installation wizard. Click Next.
    Next
  9. Keep following the instructions on the installation wizard. Click Next.
    Next
  10. Wait patiently while it installs the files.
    Status
  11. Another window may pop up. Click next.
    Next
  12. You are done! Click Close.
    Close

Step #2: Install jGRASP - An Integrated Development Environment with Visualizations for Improving Software Comprehensibility

  1. Go to this website: jGRASP Download
  2. Filling out the survey is optional.
  3. Depending on your operating system, download the appropriate executable file.
    download
  4. Save the executable file.
    Save File
  5. Open and run the executable file.
  6. Follow the instructions on the installation wizard. Click Next.
    Next
  7. Click I Agree.
    I Agree
  8. Click Next.
    Next
  9. Click Next.
    Next
  10. Click Next.
    Next
  11. you can select the type of files which will automatically be opened by jGRASP. At a minimum, click on the .java jGRASP Java file. Click Install.
    Next
  12. You are done! Click Finish.
    Finish

Step #3: Start a new program in jGRASP

  1. 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.

    new program
  2. 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. You can also compile by clicking the green '+' icon.
    compile
  3. If you have not saved your program already, it will prompt you to save the program.
    save
  4. Java programs are text files, which end with the ".java" file extension. The name of the file has to match the name of the class your program. in this example, the name of the class is "Program" and the name of the file is "Program.java".
    save
  5. Error messages, if any, will appear at the bottom of the screen. if the program compiles successfully, it will create a ".class" file, which contains Java bytecode, which is used by the computer to execute a program.
    save
  6. 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 received any error messages. It 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.
    save


Click to validate the HTML code

Click to validate the CSS code