![compiling java file windows 10 bash on ubuntu compiling java file windows 10 bash on ubuntu](https://developers.refinitiv.com/content/dam/devportal/articles/coding-and-testing-with-wsl/network-wslx-rtsdk.png)
Vi ~/.bashrcAdd the following line to the content:Įxport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javaAs printed out, JDK is installed in folder /usr/lib/jvm/java-8-openjdk-amd64. To do this, we need to find out where JDK is installed: If you prefer, you can open PowerShell as an Administrator and type: Enable-WindowsOptionalFeature-Online -FeatureName Microsoft.
![compiling java file windows 10 bash on ubuntu compiling java file windows 10 bash on ubuntu](https://phoenixnap.com/kb/wp-content/uploads/2021/04/install-openjre-11-ubuntu.png)
Select OK and you will be prompted to restart Windows. Scroll down and check Windows Subsystem for Linux.
Compiling java file windows 10 bash on ubuntu install#
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)Ĭonfigure JAVA_HOME environment variable is optional but I highly recommend it especially if you want to install Hadoop, Spark, Hive, HBase or any other Java based frameworks. In the Windows search bar, type 'features' to bring up the Turn Windows Features on and off dialog. Next, see if the Java version is installed already. First, we need to update the index of the package for installing this version. Wait until the installation is completed. The 20.04 version of Ubuntu by default includes the 11 version of OpenJDK and it is an open-source version of the JDK and JRE. That required me to use Microsoft Visual Studio to clone a sample application, edit a few dozen XML files, create a bunch of icon. Install OpenJDK via the following command: So as part of the engineering work, I needed to wrap the stock Ubuntu root filesystem into a Windows application package (.appx) file for suitable upload to the Windows Store.The command will output the following text if Java is not installed yet: -bash: java: command not found. Check whether Java is installed already:.Run the following command to update package index:.InfoThe following steps install OpenJDK 8 you can also install other compatible versions.