Files
2026-10-12 23:46:53 -04:00

123 lines
1.7 KiB
Markdown

# How to setup HSA module in IntelliJ
**Kuba Szatan**
---
## Step 1.
Download the ***hsacompiled.jar*** file [here](https://drive.google.com/file/d/1xO1sHzfKHjaQSocTkIUihtzhVre-jzr-/view?usp=sharing).
## Step 2.
Create your IntelliJ project:
![Step 2](images/step-02.png)
## Step 3.
Enter project details and click **Create**
![Step 3](images/step-03.png)
## Step 4.
Paste the downloaded ***hsacompiled.jar*** into your project root (project location)
![Step 4](images/step-04.png)
## Step 5.
Press the 4 vertical lines in the top left, click **File -> Project Structure**
![Step 5a](images/step-05a.png)
![Step 5b](images/step-05b.png)
## Step 6.
Click Libraries
![Step 6](images/step-06.png)
## Step 7.
Click **+** and **Java**
![Step 7](images/step-07.png)
## Step 8.
Select **hsacompiled.jar** and click **Select Folder**
![Step 8](images/step-08.png)
## Step 9.
Click **OK**
![Step 9](images/step-09.png)
## Step 10.
Click **Modules**
![Step 10](images/step-10.png)
## Step 11.
Check **hsacompiled**
![Step 11](images/step-11.png)
## Step 12.
Click **Apply** and **OK**
![Step 12](images/step-12.png)
## Step 13.
To test if everything works, go back to your Main class, and add basic hsa code:
```java
import hsa.Console;
public class Main {
Console c;
Main() {
c = new Console();
}
public void display() {
c.println("Hello world");
}
public static void main(String[] args) {
Main mine = new Main();
mine.display();
}
}
```
![Step 13](images/step-13.png)
## Step 14. (Final step)
Press run, and you should get the following result:
![Step 14a](images/step-14a.png)
![Step 14b](images/step-14b.png)