HSA Instructions Added
@@ -0,0 +1,122 @@
|
||||
# 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:
|
||||
|
||||

|
||||
|
||||

|
||||
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 6.1 KiB |