![]() ![]() You will see output similar to the one below – choose the number of jdk-9.0.4 – for example 3 in this list (unless you have have never installed Java installed in your computer in which case a sentence saying “There is nothing to configure” will appear): $ sudo update-alternatives -config java Run: $ sudo update-alternatives -config java ![]() This answer lists the other executables available. java, javac, javaws are probably the most frequently required. N.B.: Remember – Java JDK has many more executables that you can similarly install as above. $ sudo chown -R root:root /usr/lib/jvm/jdk-9.0.4 Be sure to use a higher priority if you want Oracle JDK to remain the default.Ĭorrect the file ownership and the permissions of the executables: $ sudo chmod a+x /usr/bin/java This will assign Oracle JDK a priority of 1, which means that installing other JDKs will replace it as the default. $ sudo update-alternatives -install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk-9.0.4/bin/javaws" 1 $ sudo update-alternatives -install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-9.0.4/bin/javac" 1 Now run: $ sudo update-alternatives -install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-9.0.4/bin/java" 1 Now move the JDK 8 directory to /usr/lib $ sudo mkdir -p /usr/lib/jvm N.B.: Check carefully this folder name since Oracle seem to change this occasionally with each update. Uncompress it: $ tar -xvf jdk-9.0.4_linux-圆4_bin.tar Download the 64-bit (or 32-bit) Linux “compressed binary file” into your home directory – it has a “.tar.gz” file extension. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |