Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to the folder ’hj-version/examples/HelloWorld’ which contains an HJ program, HelloWorld.hj.
  2. Compile the HJ program
    hjc HelloWorld.hj
  3. Run the HJ program
    hj HelloWorld
  4. This should print ’HelloWorld’.
  5. To control the number of places and threads your HJ program runs on, use the ’-places’ option as follows.
    hj -places 1:2 HelloWorld // This runs on 1 place with 2 threads

...

DrHJ - Download and Install

DrJava-HJ is the gui DrHJ is an IDE for HJ. You can edit, compile and run HJ programs from within this gui.IDE.  DrHJ runs on Unix-based platforms (e.g., Ubuntu, Mac OS, etc) and also on some Windows installations.  (For Windows, you should download a standard full JDK from Oracle to maximize the chances of DrHj working on your system.)

  1. Download the jar file corresponding to DrJava-HJ DrHJ
  2. Lets call the jar file ’drjava-hj-version’drhj.jar’.

DrHJ - Setup

There is no setup needed for DrHJ.

...

  1. Open the DrHJ IDE
    java -jar drjava-versiondrhj.jar
  2. Now you should have the DrHJ IDE running.
  3. Open a HJ program. Lets say we open hj-version/examples/fib/Fib.hj.
    Click on the open button on the top panel
    Navigate to the folder ’hj-version/examples/HelloWorld’, which contains an HJ program, HelloWorld.hj
    Select HelloWorld.hj and click open
  4. Compile the HJ program.
    Click on the compile button on the top panel
  5. The 'Compiler Output' tab in the bottom panel should show 'Compilation Completed'.
  6. Go to the 'Console' tab in the bottom panel and check if there were any errors during compilation. All errors will be shown in RED.
  7. Go to the 'Interactions' tab in the bottom panel. Run the program by typing the following.
    run HelloWorld
  8. DO NOT use the IDE with different options for ’-places’.
  9. DO NOT use the IDE for timing your executions.