Oracle JDK 11 Antergos Linux - Setting Up
-
3. Setting Up JDK
Next to Relocate JDK 11 into the Target
First, Check that the needed Folder is there:if [ ! -d "/usr/lib/jvm" ]; then mkdir /usr/lib/jvm; fi
Next Extract the Archive directly into the Destination with:
sudo tar xvzf ~/Downlads/jdk-11*.tar.gz -C /usr/lib/jvm/
Now Set the SuperUser as owner:
sudo chown -R root:root /usr/lib/jvm/jdk-11*
Finally, reiterate the Execution Permission over the Java binaries:
sudo chmod -R +x /tmp/jdk-11*/bin
-
4. Making Symlinks
Follow to Setup the Needed Symlinks
First, to Copy the Exact Path to Insert in File:cd /usr/lib/jvm/jdk-11*
pwd
After the Next Commands come back and Select Copy this Output…
To Copy on Terminal Ctrl+Shift+c.
Then Relaese the potentially existing Symlinks:cd ..
sudo unlink default
sudo unlink default-runtime
So now for the JDK make:
sudo ln -s [copiedJdkPath] default
Ctrl+Shift+v to Paste the Path Copied from the above Output.
And again for the Java Runtime Environment:ln -s [copiedJdkPath] default-runtime
With this you Should be Done! ;)
-
5. Setting Up Env Vars
Again SetUp the JDK 11 Environment Variables
Make Use of the same Path as on the preceding Step…
And to Edit the Config File:nano /etc/profile.d/oracleJDK11.sh
Copy and Paste into something like that:
/nexport J2SDKDIR=[copiedJdkPath]/nexport J2REDIR=$J2SDKDIR/jre/nexport JAVA_HOME=$J2SDKDIR/
Again take Care to Replace the [copiedJdkPath] with the Actual one!
Ctrl+x to Save & Exit from nano Editor :)
Finally, do the Same also for the csh Shell:nano /etc/profile.d/oracleJDK11.csh
setenv J2SDKDIR=[copiedJdkPath] setenv J2REDIR=$J2SDKDIR/jre setenv JAVA_HOME=$J2SDKDIR/
-
6. Testing Installation
Finally, Test Oracle JDK Java Setup.
javac -version
On the Output simply must Not be present an Openjdk to Certify it…
Contents