• HJDownload

Versions Compared

Key

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

Download and Setup Instructions for

...

Habanero-Java (HJ)

...

installations

There are two installations available for HJ.  One uses an IDE installation called DrHJ which works on Linux, Mac OS, and Windows.  The other uses a command-line installation, which is only supported on Linux and MacOS but not Windows. If you have a Windows machine, you will have to remotely login to one of the lab machines and work on it. DrHJ (rather than command-line version of HJ) can work on Windows if you install a standard Oracle JDK.  Please contact Vincent Cavé if you need help with that.  

...

a Linux lab machine to use the command-line installation. Please contact Vincent Cavé if you have any questions with installing any of the software listed below.  You can find a number of sample HJ programs and lab exercises in the COMP 322 web page.

1) DrHJ - Download and Install

DrHJ is an IDE for HJ. You can edit, compile and run HJ programs from within this 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 DrHJ
  2. This jar file should be called ’drhj.jar’.  If not, please use the actual name instead of drhj.jar in the instructions below.

DrHJ - Setup

There is no setup needed for DrHJ.

DrHJ - Testing

Here are the instructions to compile and run HJ programs using the DrHJ IDE.

  1. Open the DrHJ IDE
    java -jar drhj.jar
  2. Now you should have the DrHJ IDE running.
  3. Open a HJ program.
    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

2) HJ - Download and Install

You will have to download and install HJ once for every machine you plan to use HJ on.

...

  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

DrHJ is an IDE for HJ. You can edit, compile and run HJ programs from within this 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 DrHJ
  2. Lets call the jar file ’drhj.jar’.

DrHJ - Setup

There is no setup needed for DrHJ.

DrHJ - Testing

Here are the instructions to compile and run HJ programs using the DrHJ IDE.

  1. Open the DrHJ IDE
    java -jar drhj.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