Getting the Software

In order to be able to write programs in Java at home, you'll need to obtain and install some software. It's all free for personal use. You can freely download this software from the Internet. Some of these files can be quite large (37+MB), so I'd recommend downloading this stuff while at school (the networks here are pretty fast), if possible.

This software has also been installed on the classroom computers, the hallway computers, and some of the computer in the Open Learning Center here at Cascadia. You should anticipate spending as much as 2-4 hours to get all your software downloaded and installed correctly, more if you're trying to download this stuff over a slow connect. As such, you should allot enough time to both get all this software AND to work on your first assignment. If you can't get this to work, please ask and I'll try and help out. If you have a laptop you are encouraged to bring the laptop to class so that the instructor can trouble-shoot any problems directly on your computer.

Do remember that Cascadia has public computer labs which you can use. If nothing else, you can always go there and use those computers. As such, I won't accept excuses such as "My homework is late because I couldn't install the software"

  1. Download the Java Development Kit (JDK)
    (This step has already been done for you on the computers at Cascadia)

    First, you need to get the Java Development Kit (JDK) from the company that makes it, Sun Microsystems. Luckily, they give it away for free :)

    We want to get the JDK that contains the product known as "Java SE". Go to the Oracle site and choose the appropriate edition for your computer. You will need to agree to the user agreement.

    It's also very important that you get (and install) the JDK first, since a number of other software packages require the JDK to be installed before them. Note that there's a Java Runtime Environment (JRE). This ISN'T enough – it will let you run Java programs that other people have created, but won't let you create any on your own. The JRE is included wiht the JDK.

    Lastly, if you previously installed a version of Java I'd recommend un-installing the prior version, then installing this version. If you do this, make sure to put the new JDK into the same location as your old one.

    Make sure that you download the file from column labelled "JDK" (or "SDK"), instead of the JRE. The JRE ("Java Runtime Environment") contains all the software that you need, in order to RUN Java programs, but not WRITE/CREATE Java programs. The JDK ("Java Development Kit") or SDK ("Software Development Kit") contains everything you need to DEVELOP/WRITE/CREATE Java-based software in addition to running Java programs.

  2. Download the Java Documentation
    (This step has already been done for you on the computers at Cascadia)
    Oracle maintains documentation for Java programmers on-line at http://docs.oracle.com/javase/8/docs/api/

  3. Install the JDK and Documentation
    (This step has already been done for you on the computers at Cascadia)

    Once you've downloaded the above two items, you should install them on your hard drive. I'd accept whatever defaults the JDK suggests in terms of location, etc.

  4. Download the development environment: jGrasp
    (This step has already been done for you on the computers at Cascadia)

    Technically, you can develop Java programs using nothing more than the JDK, Notepad, and a command prompt. However, this can be tricky, so we'll be using an Integrated Development Environment (IDE) to let us focus on writing Java, not on making the JDK do what we want.

    We'll be using the jGrasp IDE during class, and I'd recommend that you use the same software at home, as well. You can download a free version from: the jGrasp homepage.

    Again, getting a version that is newer than Cascadia's shouldn't hurt. You should download the version that's appropriate for your operating system (for Windows, the top-most button, labeled jGRASP.exe, is what you want)

    Once you've downloaded the IDE, you should then install it. It may need to be told where your JDK is (which you've already installed, right?).

    For Advanced Students Only: You're free to use any other IDE that you want – Eclipse has gotten good reviews ( http://www.eclipse.org), and is widely used in industry, as is Intellij (https://www.jetbrains.com/idea/). If you choose to use anything other than jGRASP, you're on your own if you run into problems. While I'll try and offer help, I won't really be able to guarantee anything. I can't guarantee that I'll be able to fix any problems you have at home, with jGRASP, either, but I do know more about jGrasp, and so can probably be of more help :) .

  5. Download the Robot software
    (This step is specific to BIT 115 - if you're in anything else, you don't have to do this step)

    You'll need some custom software in order to actually write programs that use the Java-based "Karel The Robot". This version of the software was created by Byron Weber Becker, at the University of Waterloo in Canada. You'll need the following three files. Here at school, I would recommend placing them in your personal folders, which should be mapped to the H: drive letter. Further, I'd create a folder named BIT115, and move all three files that you downloaded in step 5 there. At this point, you'd don't need to un-ZIP the Robot documentation or examples, although you should feel free to look through them on your own, if you're curious. You may have to download the files by RIGHT-clicking on each link, and selecting Save Target As from the pop-up menu that appears.

    Download the files found here

    If you don't download this file and install it correctly, NONE OF YOUR PROGRAMS WILL WORK!! Please see the Lecture 1 tutorial for more details on installing this file so that jGrasp will know how to find it.

  6. Configure jGrasp

    In addition to the functionality that standard Java gives us, we're going to use some custom software that will simulate robots. This software is found in the named becker.jar, which you downloaded when you installed all the other software. (JAR is short for Java ARchive, by the way.) However, before you can write Java programs that use this, you need to tell JGrasp where to find the file. You do this by setting the classpath to make JGrasp locate becker.jar NONE OF YOUR PROGRAMS WILL WORK UNTIL YOU DO THIS. On your personal machine you will only need to do this once.

    To set the classpath, open the Settings menu and select the PATH / CLASSPATH option, and then finally the Workspace menu item. You will see a dialog window that resembles the one below. First click on the CLASSPATHS tab (not merely the PATHS tab), and then click the New button, and you'll see another dialog window that resembles the last figure. Click on the button labeled Browse, and find the Becker.jar file that you've downloaded. Becker.jar contains all of the custom software that we'll need to simulate our robots. You may also add the documentation here, if you'd like, but you're not required to. When you click OK, you should see an entry in the first dialogue box. Click OK button (circled in pink) to get back to the main editor window.




  7. Download a template for the first day

    For the first day, you'll use a template to get you started. You will be expected to eventually be able to create an entire Java program from scratch (with no help from books, or your peers), but for the first day, you'll use a pre-written file to get you doing something interesting immediately. You can download that file from: Starting_Template.java

    Please save this file into the BIT115 folder that you created in Step 5. Make sure to keep the name of the file (Starting_Template.java) exactly the same. Now you're ready to go on to the tutorial, where you'll start learning how to program!