When we develop locally in Windows system, we always encounter some weird problems that are not quite consistent with the online Linux system. These problems are caused by the characteristics of the system environment, so it is essential to have a Linux VIRTUAL machine with a Java running environment.
Open Windows 10 with Ubuntu
Usually, we use Ubuntu system, which can be installed directly on the computer or in virtual machine software, such as VMware, VirtualBox and so on. In fact, Win10 system has a built-in Ubuntu virtual machine, next we will start it step by step.
- Find programs and feature options, click on Enable or disable Windows features, and check Windows Subsystem for Linux
Second, Java running environment construction
To check whether the Java environment exists, use the following command:
java -version
I found that the system does not integrate the Java runtime environment, and prompted us to install the command, because I am using java8, so I installed jre8, those who use the higher version can choose another, enter the command:
sudo apt-get install openjdk-8-jdk
Once the installation is complete, execute the following command to check again
At this point, the Java environment is installed