-[Super easy] How to install VirtualBox on Windows -[2019 latest] How to create an Ubuntu virtual environment with VirtualBox
As prior knowledge, the contents of the above link are required.
―― Java is a class-based object-oriented programming language, which is characterized by being generic and ʻOS independent. -- Java is a fast and reliable language in terms of security. --The advantage of choosing Java is that it is used in a wide range of areasdue to its high reliability, and it has abundantlibraries and so on`.

#Add repository
$ sudo add-apt-repository ppa:webupd8team/java
#Get the package list from the repository
$ sudo apt-get update
and start the virtual machine`.command line.#Install JRE
$ sudo apt-get install openjdk-6-jre
$ sudo apt-get install openjdk-7-jre
$ sudo apt-get install openjdk-8-jre
version and enter the command.#Install the JDK
$ sudo apt install openjdk-6-jdk
$ sudo apt install openjdk-7-jdk
$ sudo apt install openjdk-8-jdk
same version as the version selected in` 3. Install JRE``.

Hello.java
public class Hello{
public static void main(String[] args){
System.out.println("Hello World!!");
}
}
File and right-click.New Folder and change Folder Name to Java.text editor.text editor and click the save button.Hello.java as the file name and click the Save button.command line and enter the code below.#Move to Java folder
$ cd Java
# Hello.Compile java
$ javac Hello.java
#Run
$ java Hello

Hello World !! is displayed as shown in the image, it is successful.#java version check
$ java -version
#javac version check
$ javac -version
#Java management
$ sudo update-alternatives --config java
#Javac management
$ sudo update-alternatives --config javac
-- java -version can check the version of java. --javac -version allows you to check the version of javac. -- sudo update-alternatives --config java allows you to manage multiple java versions. --sudo update-alternatives --config javac allows you to manage multiple javac versions`.
Recommended Posts