Date : 21 / 04 / 2019
I thought to write this gist due to the difficulties which I had to face when installing Oracle Java Development Kit to my Arch Linux OS. At this moment, AUR links not working for installations because of direct downloads are no longer available. You have to create an Oracle account, download, and put in with the PKGBUILD.
This solution will work with Arch Linux and Manjaro.
Now let's do it.
- Its probably easiest to just do it manually instead of trying to dance with an automated helper and its directories.
cd ~/Downloads && git clone https://aur.archlinux.org/jdk8.git
- Now you should have a jdk8 folder in Downloads. Move that ".tar.gz" which you downloaded from oracle to that folder, If it is also in downloads, and I got the filename right, the command would be like this.
mv ~/Downloads/jdk-8u212-linux-x64.tar.gz ~/Downloads/jdk8/
- Now we will enter the jdk8 folder and should edit the PKGBUILD.
cd jdk8 && nano PKGBUILD
- The source line we want to change from is....
"https://download.oracle.com/otn-pub/java/jdk/${pkgver}-${_build}/${_hash}/${_pkgname}-${pkgver}-linux-x64.tar.gz"
to the filename we now have in folder,
jdk-8u212-linux-x64.tar.gz
- Save and exit the PKGBUILD. Now we can build and install from within that directory.
makepkg -sric
- If everything looks like it went fine you can just remove that directory when you are done.
cd ~ && rm -r ~/Downloads/jdk8
Thank you for this guide.
There are some issues I encountered so for anyone following this guide as well and having trouble installing it:
You might need to replace the
md5sum
as well as thesha256sum
for the .tar.gz file.You can do this by generating your own via the terminal
For
md5sum
do:For
sha256sum
do:If this still doesn't work check if the version you are using - in this guide's case 212 - is uncommented in the first few lines of
PKGBUILD
while other versions like 231 for example are commented. In my case those were inline 8
of thePKGBUILD