10/7/2023 0 Comments Install java in ubuntu![]() # sudo update-alternatives -install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_151/bin/javac" 0 # sudo update-alternatives -install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_151/bin/java" 0 Use update-alternatives to inform Ubuntu about the installed java paths. Step 4: Inform Ubuntu about the installed location The environment file should now be similar to this text: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk1.8.0_151/bin:/usr/lib/jvm/jdk1.8.0_151/db/bin:/usr/lib/jvm/jdk1.8.0_151/jre/bin" Add the below variables at the end of environment file, making changes for your specific version and update. HOME directory paths can be different based on version and update,here the version is 1.8 and the update is 151. Update the existing PATH variable by adding the below bin folders, separated with a colon. # sudo tar -xvzf ~/Downloads/jdk-8u151-linux-圆4.tar.gzĮdit the environment file. # cd /usr/lib/jvmĮxtract the downloaded JDK. Step 2: Extract JDK to Java's default locationĬreate a jvm folder in /usr/lib/ which is the default location for Java. It is recommended that you install only the latest JDK. A text editor, whether it's vi, vim, emacs, etc.The instructions in this tutorial will work on other versions of Ubuntu as well, including 14.04, 16.10, and 17.04. In this guide, you'll learn how to manually install Java 8 on Ubuntu 16.04.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |