Sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/local/java/jdk1.7.0_80/bin/javaws” 1
Sudo update-alternatives –install “/usr/bin/javac” “javac” “/usr/local/java/jdk1.7.0_80/bin/javac” 1 Sudo update-alternatives –install “/usr/bin/java” “java” “/usr/local/java/jdk1.7.0_80/bin/java” 1 To check if the files extracted correctly doĥ.Open /etc/profile in nano with sudo privileges and copy the following text at the bottom of the file (PageDown for quicker navigation to the bottom of the file):Ħ.After saving the file, the next thing you should do is the following commands, they will update all the paths to the openjdk-7: Let’s get started! 1.Open up a terminal (for most distros it’s Ctrl+Alt+T, but if yours doesn’t open one up, look up terminal in your application list)įor purposes of this tutorial I will be using a WSL 2 machine, but this applies to all Ubuntu/Debian derivatives.ģ.The next step is to create a directory in the locationĪnd copy the file we just downloaded thereĤ.What we need to do after copying the file is to enter the directory we previously created and extract the tarball we copied to it
Ok, so to install OpenJDK 7, it’s a bit of a tricky process, but I hope my guide will assist you in achieving that. Now this error probably occured because you are using a openjdk that’s newer than OpenJDK version specific for your LineageOS version.Īs we can see in the official build guide from LineageOS Wiki, OpenJDK 1.7 is needed to build cm-13 and such)Īnd you have arrived at an error that looks something like thisĮrror: could not find jdk tools.jar, please check if your JDK was installed correctly. If you’re viewing this page you have probably tried building an older version of lineage (i.e.