![]() ![]() If you can see the version number 1.8.XX, Java 8 installation completed. Sudo apt-get install oracle-java8-installerĪfter installation, you can check the java version: $ javac -version Sudo apt-key adv -keyserver hkp://:80 -recv-keys EEA14886 Sudo tee -a /etc/apt//webupd8team-java.list Follow the steps below: echo "deb xenial main" | \ To install Java 8 on Debian Jessie with minimum effort, you can use WebUpd8’s Java PPA repositories. deb package, run command to remove it: sudo apt remove jdk-20įor the Arm64 package, just remove the Java folder under ‘/usr/lib/jvm’ directory: sudo rm -R /usr/lib/jvm/jdk-20Īlso, remove the config file under ‘/etc/profile.d’ directory: sudo rm /etc/profile.d/jdk.sh /etc/profile.d/jdk.Oracle Java 8 required by some programs and it is not available on Debian archive due to licensing issues. To uninstall Java 20 installed via the previous steps, open terminal and run commands below one by one.įor the Java package installed via. When done, restart your computer and verify Java HOME by running java -XshowSettings:properties -version command. Setenv PATH $:/usr/lib/jvm/jdk-20/bin:/usr/lib/jvm/jdk-20/db/bin Then, run command & edit another profile config file: sudo nano /etc/profile.d/jdk.cshĪnd, paste following lines: setenv J2SDKDIR /usr/lib/jvm/jdk-20.When file opens in terminal, paste following lines: export J2SDKDIR=/usr/lib/jvm/jdk-20Įxport PATH=$PATH:/usr/lib/jvm/jdk-20/bin:/usr/lib/jvm/jdk-20/db/binįinally, press Ctrl+X, type y and hit Enter to save the file. First, open terminal and run command to create & edit a system-wide profile file: sudo nano /etc/profile.d/jdk.sh.To make it system wide and permanently, you need to add the rules into profile config file. However, it works in that terminal window only until you close it. ![]() Step 4: Set Java HOME & PATH variablesįor temporary use, you can run a single command in terminal to set Java Home. When done, verify by running java -version and javac -version in terminal. In terminal output, type your desired number and hit Enter to choose which Java as default Then, run update-alternatives command with -config flag to set the default Java executable one by one: sudo update-alternatives -config java sudo update-alternatives -config javac.First, use update-alternatives commands to install Java 20 as alternative links to java executables: sudo update-alternatives -install /usr/bin/java java /usr/lib/jvm/jdk-20/bin/java 100 sudo update-alternatives -install /usr/bin/javac javac /usr/lib/jvm/jdk-20/bin/javac 100įor choices, you may also run similar command to install jar etc as alternative.Now, you can set the Oracle Java 20 you just installed as default by doing following steps one by one.Īlso, open terminal and run commands below one by one: Rename the extracted folder, for easy later use: sudo mv jdk-20.* jdk-20.Verify the extracted folder: cd /usr/lib/jvm & ls.Then, run command to extract the archive to that directory: sudo tar -zxf jdk-*_linux-aarch64_ -C /usr/lib/jvm.First, make sure the destination directory exist, by trying to create it: sudo mkdir -p /usr/lib/jvm.For the ‘ARM64 Compressed Archive’, run commands below one by one to extract it to ‘/usr/lib/jvm’:.For the ‘圆4 Debian Package’, just run command to install it: sudo apt install.Then, install the Java package accordingly. So it opens a terminal window with your Downloads as working directory. Right-click on blank area and select “ Open in Terminal“. 圆4 Debian Package – for Debian/Ubuntu running on modern 64-bit x86 PC and laptop.Īfter downloaded the Java package, open to your Downloads folder.ARM64 Compressed Archive – for 64-bit ARM CPU architecture type, such as Raspberry Pi and Apple M1/M2.In the download page, select download one of packages below: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |