123 lines
1.7 KiB
Markdown
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 3.
|
|
|
|
Enter project details and click **Create**
|
|
|
|

|
|
|
|
## Step 4.
|
|
|
|
Paste the downloaded ***hsacompiled.jar*** into your project root (project location)
|
|
|
|

|
|
|
|
## Step 5.
|
|
|
|
Press the 4 vertical lines in the top left, click **File -> Project Structure**
|
|
|
|

|
|
|
|

|
|
|
|
## Step 6.
|
|
|
|
Click Libraries
|
|
|
|

|
|
|
|
## Step 7.
|
|
|
|
Click **+** and **Java**
|
|
|
|

|
|
|
|
## Step 8.
|
|
|
|
Select **hsacompiled.jar** and click **Select Folder**
|
|
|
|

|
|
|
|
## Step 9.
|
|
|
|
Click **OK**
|
|
|
|

|
|
|
|
## Step 10.
|
|
|
|
Click **Modules**
|
|
|
|

|
|
|
|
## Step 11.
|
|
|
|
Check **hsacompiled**
|
|
|
|

|
|
|
|
## Step 12.
|
|
|
|
Click **Apply** and **OK**
|
|
|
|

|
|
|
|
## 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 14. (Final step)
|
|
|
|
Press run, and you should get the following result:
|
|
|
|

|
|
|
|

|