1 
 2 # Babylon and HAT Quick Install
 3 [Back to Index ../](../index.md)
 4 
 5 This page shows a minimal installation and configuration for Babylon and HAT.
 6 You can follow this guidelines to get started.
 7 
 8 Alternatively, if you want to control more options during the installation,
 9 such as `jtreg` and/or jextract, follow these links:
10 - [Building Babylon](babylon.md)
11 - [Building HAT](hat.md)
12 
13 If you want to enable the CUDA backend for running on NVIDIA GPUs, use the following link
14 to obtain the list of dependencies for the CUDA SDK.
15 
16 - [Enabling the NVIDIA CUDA Backend](nvidia-notes.md)
17 
18 ## 1. Build Babylon JDK
19 
20 ```bash
21 git clone https://github.com/openjdk/babylon
22 cd babylon
23 bash configure --with-boot-jdk=${JAVA_HOME}
24 make clean
25 make images
26 ```
27 
28 ## 2. Update JAVA_HOME and PATH
29 
30 ```bash
31 export JAVA_HOME=<BABYLON-DIR>/build/macosx-aarch64-server-release/jdk/
32 export PATH=$JAVA_HOME/bin:$PATH
33 ```
34 
35 ## 3. Install HAT specific (cmake and maven) dependencies
36 Either
37 ```bash
38 sudo apg-get install maven cmake
39 ```
40 Or
41 ```bash
42 brew install cmake
43 brew install maven
44 ````
45 ## 4. Build HAT
46 ```bash
47 cd hat
48 java mvn clean package
49 ```
50 Done!
51 ## 5. Run Examples
52 For instance, matrix-multiply:
53 ```bash
54 java @.ffi-opencl-example matmul.Main --size=1024
55 ```
56 ## 6. Unit-Tests
57 OpenCL backend:
58 ```bash
59 java @.ffi-opencl-test-suite
60 ```
61 CUDA backed:
62 ```bash
63 java @.ffi-cuda-test-suite
64 ```
65 
66