Skip to content

Commit 5d2d832

Browse files
committed
Doc: Reogranize file structure
1 parent f05fdca commit 5d2d832

13 files changed

+16
-12
lines changed

03_java/00_overview.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Overview
2+

03_java/01_getting_started_with_java.md renamed to 03_java/01_installation_and_quick_start.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Getting Started With Java
1+
# Installation And Quickstart
2+
3+
![Installation and quickstart](images/01_instatallation_quickstart/overview.png)
24

35
To build things using Java, you need the Java Development Kit (JDK). It is one of the three core technology packages used in Java programming. The other two are the Java Virtual Machine (JVM) and the Java Runtime Environment (JRE).
46

@@ -19,7 +21,7 @@ To build things using Java, you need the Java Development Kit (JDK). It is one o
1921

2022
I will show you how to install the open-source JDK (OpenJDK) from Amazon called the [Amazon Corretto](https://aws.amazon.com/corretto/?filtered-posts.sort-by=item.additionalFields.createdDate&filtered-posts.sort-order=desc). As of this writing, I will be showing you how to download [Amazon Corretto 17](https://docs.aws.amazon.com/corretto/latest/corretto-17-ug/downloads-list.html).
2123

22-
![Amazon Corretto JDK](/03_java/images/getting_started/download_jdk.png)
24+
![Amazon Corretto JDK](images/01_instatallation_quickstart/download_jdk.png)
2325

2426
You can choose to either use the terminal commands to download the JDK or you can click on the highlighted link to download directly from the site. Ensure that you download the file to a location you want, say in the home directory, for example.
2527

@@ -121,32 +123,32 @@ When working with Java Projects, VS Code does not offer core support the way Int
121123
122124
At this point, you should already have the [Extension pack for Java](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack) installed. To create a Java Project, open VS Code.
123125
124-
![Open VS Code](/03_java/images/getting_started/open_vs_code.png)
126+
![Open VS Code](images/01_instatallation_quickstart/open_vs_code.png)
125127
126128
Select on "File Explorer" to access the "Create Java Project" button. Click on it.
127129
128-
![No build tools](/03_java/images/getting_started/no_build_tools.png)
130+
![No build tools](images/01_instatallation_quickstart/no_build_tools.png)
129131
130132
Select the "No build tools" option. This will open the location you want to create your project. Choose an appropriate location in your system.
131133
132-
![Name project](/03_java/images/getting_started/create_project.png)
134+
![Name project](images/01_instatallation_quickstart/create_project.png)
133135
134136
Once you have selected a location, give your project a name as seen in the input box. Press "Enter" to confirm.
135137
136-
![Java Project](/03_java/images/getting_started/java_project.png)
138+
![Java Project](images/01_instatallation_quickstart/java_project.png)
137139
138-
Notice that the project comes with a structure already. In the example above, I have already clicked on the `App.java` file. You can do the same. To run it, you can press the "play" button on the top-right, or `f5`. Alternatively, you can right-click on the file to access the command "Run Java". Select it and you will see the text "Hello World" displayed on the terminal.
140+
Notice that the project comes with a structure already. In the example above, I have already clicked on the `App.java` file. You can do the same. To run it, you can press the **"play"** button on the top-right, or `f5`. Alternatively, you can **right-click on the file to access the command "Run Java"**. Select it and you will see the text "Hello World" displayed on the terminal.
139141
140142
## Changing the Default JDK
141143
142144
You may notice that when you run the script above, the default JDK 11 is used instead of the newly installed Amazon Corretto 17. Typically, this is an issue to do with the path to the jdk. If we want to use Amazon Corretto 17, then we need to modify our settings to point to this jdk.
143145
144146
145147
- Click on "Java Projects" at the bottom left of the VS Code's sidebar to access `...` more actions option.
146-
![More Actions](/03_java/images/getting_started/more_actions.png)
148+
![More Actions](images/01_instatallation_quickstart/more_actions.png)
147149

148150
- Click on "Configure Java Runtime".
149-
![Java Version](/03_java/images/getting_started/java_version.png)
151+
![Java Version](images/01_instatallation_quickstart/java_version.png)
150152
- My VS Code is already configured to use Corretto 17, but by default, the version number may be 11. This is different from our installation efforts above. To change it to version 17, or whatever version you may have, we need to modify VS Code's configurations to point to Corretto 17.
151153
152154
- Get the path to Amazon Corretto. From your home directory, list the available JVMs:
@@ -166,9 +168,9 @@ You may notice that when you run the script above, the default JDK 11 is used in
166168
```
167169
- The path we want is `/usr/lib/jvm/java-17-amazon-corretto`.
168170
- Open `settings.json` from the command pallette in VS Code by pressing "Ctrl + Shift + P".
169-
![User setting VS Code](/03_java/images/getting_started/user_settings.png)
171+
![User setting VS Code](images/01_instatallation_quickstart/user_settings.png)
170172
- Add the path to Amazon Corretto to the file
171-
![Add path](/03_java/images/getting_started/add_path.png)
173+
![Add path](images/01_instatallation_quickstart/add_path.png)
172174
- The path is:
173175
```json
174176
"java.jdt.ls.java.home": "/usr/lib/jvm/java-17-amazon-corretto/"
Loading

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ This repository holds all the notes of the things I have learnt. Anyone else can
5858

5959
## Java Articles
6060

61-
- [Getting Started With Java](/03_java/01_getting_started_with_java.md)
61+
- [Getting Started With Java](03_java/00_overview.md)
6262

6363
## General Articles
6464

0 commit comments

Comments
 (0)