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 Note that the HJ software is currently 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. to 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.)
- Download the jar file corresponding to DrHJ
- 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.
- Open the DrHJ IDE
java -jar drhj.jar - Now you should have the DrHJ IDE running.
- 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 - Compile the HJ program.
Click on the compile button on the top panel - The 'Compiler Output' tab in the bottom panel should show 'Compilation Completed'.
- 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.
- 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.
...
- Go to the folder ’hj-version/examples/HelloWorld’ which contains an HJ program, HelloWorld.hj.
- Compile the HJ program
hjc HelloWorld.hj - Run the HJ program
hj HelloWorld - This should print ’HelloWorld’.
- 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.)
- Download the jar file corresponding to DrHJ
- 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.
- Open the DrHJ IDE
java -jar drhj.jar - Now you should have the DrHJ IDE running.
- 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 - Compile the HJ program.
Click on the compile button on the top panel - The 'Compiler Output' tab in the bottom panel should show 'Compilation Completed'.
- 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.
- Go to the 'Interactions' tab in the bottom panel. Run the program by typing the following.
run HelloWorld