JDK and jGrasp Installation Instructions - Updated 11-3

Embed Size (px)

Citation preview

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    1/20

    JDK and IDE InstallationInstructions

    ObjectivesInstall a Java Development Kit (JDK) and an Integrated Development Environment

    (IDE) on a personal computer. Create a Java program.

    Description

    In this exercise you will download a JDK and an IDE to your personal computer. Youwill use these tools to create Lab 1. The project is divided into three sections:

    1. Downloading the JDK

    2. Downloading the IDE (jGrasp)

    3. Creating your first program

    Academic RequirementsTo successfully complete this project you should read the following chapters in your

    book:

    1. Introduction to Computers and Java

    2. Java Fundamentals

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    2/20

    JDK Installation1. Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html

    2. Download the JDK:

    3. Accept License Agreement. Download Windows x86 version (32 Bit).

    Complete the installation process as directed on the screen.

    Follow the instructions for downloading the jGrasp. Complete the lab asinstructed.

    http://www.oracle.com/technetwork/java/javase/downloads/index.htmlhttp://www.oracle.com/technetwork/java/javase/downloads/index.html
  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    3/20

    jGrasp Installation Instructions

    1. Go to www.jgrasp.org. On the home page click the Download jGRASP icon.

    2. Scroll down on the Download page. Click thejGrasp.exe button.

    http://www.jgrasp.org/http://www.jgrasp.org/
  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    4/20

    3. Click the Run button on the File Download window.

    4. Click Next on the jGrasp Setup window.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    5/20

    5. Accept the License Agreement on the jGrasp Setup window.

    6. Click Next on the jGrasp Setup window.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    6/20

    7. Click Next on the jGrasp Setup window.

    8. Click Next on the Start Menu Folder window.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    7/20

    9. Press the Install button on the jGrasp Setup window.

    10.Click Finish on the jGrasp Setup window.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    8/20

    11.You will see the jGrasp icon on your desktop.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    9/20

    Programming Challenge 1: Your First Java Program

    1. Create a Java folder on your desktop (or any storage device of your choice).

    Right clickon an empty space on the desktop. Click New.

    2. Click Folder.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    10/20

    3. Create a new folder namedJava Program Files.

    4. OpenjGrasp.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    11/20

    5. Maximize your screen.

    6. Click File on the Menu bar.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    12/20

    7. Click New.

    8. Click Java.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    13/20

    9. Maximize the jGrasp CSD window

    10.Type the following text. Use the correct punctuation and capitalization. You

    can see the code in your book: Programming Challenge 1.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    14/20

    11.Click File on the Menu bar. Click Save As on the File menu. Save the

    program using the name MyFirstProgram_Firstname_Lastname.java.

    12.Under Look in, on the Save As window, use the arrow to change to the

    Desktop where you created theJava Program Files folder.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    15/20

    13.Open theJava Program Files folder on the Save As window.

    14.Click the Save button on the Save As window.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    16/20

    15.Compile Your Program. Click the Compile icon.

    You will see the following messge in the Compile Message window if the

    compile was successful.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    17/20

    16.Run Your Program. Click the Run icon.

    You will see Hello World in the Run I/O window.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    18/20

    Correcting Source Code Errors

    The following instructions will demonstrate how to correct a source code error. In

    this exercise I will spell void as vodi to generate an error message.

    1. If necessary, clear the I/O window.

    2. Change the word void to vodi.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    19/20

    3. Click the Toggle Numbers icon to add numbers to each line (you can also

    click this icon before writing code for any program).

    4. Compile your program. The following error is generated:

    Please note: The error message identifies Line 4 as the location for the error. Certain errors

    may not be identified on the exact line where the error is located. You should look in the area

    above or below the line to locate the error.

  • 8/3/2019 JDK and jGrasp Installation Instructions - Updated 11-3

    20/20

    5. Make the correction to the program code. Compile the program. Run the

    program.