I installed the Windows 10 Anniversary Update so that I could try Bash on Ubuntu on Windows. See how to install it. I wanted to see how performant it was. I then installed the Oracle Java JDK as per this article, so I could compare compilation times with the native Windows Java compiler.
I then tried to run Maven on my project, but it didn't work. Maven just hung starting. I noticed in Task Manager that the "java" process was hovering around 92% CPU.
So I tried something simple. I created a dummy Java Hello-world-like class and attempted to compile it with javac. Similarly, the "javac" process sat around 92% CPU.
I thought maybe it had something to do with running headless, but the -Djava.awt.headless=true
option didn't make it any better.
Has anyone got this to work or have anything to try?
Update:
I also tried installing the Open JDK instead of the Oracle JDK (via sudo apt-get install openjdk-7-jdk
) with the same result.
Ubuntu offers the default-jre package, which is regularly updated to ship the latest version of the current OpenJDK JRE in Long Term Support (LTS). The default-jre is an excellent choice for most situations, thanks to the outstanding track of backwards compatibility of the Java Virtual Machine.
However, it is possible to either install and use Oracle JDK for Windows installation from WSL, or install OpenJDK Java into your WSL world from the Ubuntu package manager.
I figured it out. I couldn't use the download directly from Oracle. Instead I had to install it as per this link. Here are the steps:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With