After installation and version confirmation Create a folder with VSCord and test until you get the expected results Click here to build Java environment
#Create a test directory
$ mkdir -p ~/java/test
#Move to directory
$ cd ~/java/test
#Create a test file
$ touch test.java
#Edit test file
$ vi test.java
//test.java
class Main {
public static void main(String[] args) {
String msg = "";
msg += "Hello ";
msg += "World!";
System.out.println(msg);
}
}
#Move to the created directory
$ cd ~/java/hello
Save as: wq
$ java test.java
Hello World
Recommended Posts