CSIL Java Instructions

There are several ways to use Java in the CSIL labs. The instructions below should be enough to get you started. In order of preference.

Linux: Command Line

  1. Open a text editor to work with your code. Many text editors are installed and you can work with any of them. If you have no preference, you might want to try NEdit or Kate:
    nedit filename.java
    kate filename.java
  2. You can compile and run Java programs with the standard tools:
    javac filename.java
    java ClassName

    In Kate, you can use the embedded command line. If it's not visible, select Settings → Tool Views → Show Terminal, and dock it to your window.

Windows: Command Line

  1. Open a text editor to work with your code. Crimson Editor is installed in the lab: Start → Programs → cmpt125 → Crimson Editor.
  2. Save your .java somewhere on the H: drive.
  3. Start the “Java Prompt”: Start → Programs → Java → Java Prompt.
  4. You can then compile and run Java programs:
    javac filename.java
    java ClassName

Windows: JCreator

  1. Start the JCreator environment: Start → Programs → Java → JCreator → JCreator LE.
  2. Create a Java file: File → New → Java File. Save this file somewhere on the H: drive.
  3. Edit your code and save it.
  4. You can compile and run the program with buttons on the toolbar. [I had a screenshot and lost it, so this will have to wait.]

Windows: Eclipse

  1. Start the Eclipse environment: Start → Programs → Java → Eclipse.
  2. Create your workspace somewhere on the H: drive.
  3. Create a new project: File → New → Project → Java Project. Name the project and click “Finish”.
  4. Create a class file: File → New → Class. Name it and click “Finish”.
  5. Edit your code and save it.
  6. To run your program, select Run → Run As → Java Application. For subsequent runs, you can press control-F11.