Jdk 8 arch linux

How to install Java on Arch Linux

I already commented out my nearest Pacman repository in /etc/pacman.d/mirrorlist and ran a first update by invoking pacman -Syu hoping that this would cause the package above to be discovered. How can I install Open JDK 7 on Arch Linux using pacman? Edit: I’m running a Raspberry Pi with an ARM processor and I’m hoping to get a Java build that is tailored for its hardware and uses the OS hardware floating point support.

It finds one, extra/openjdk6 6.b24_1.11.4-1 . I tried several combinations, but pacman -S openjdk6 was not one of them. It’s an old version, and it seems to give me just a JRE instead of a complete JDK.

8 Answers 8

Get the best mirror near you (check this list); you can even generate a new mirror list on the archlinux website. Then run # pacman -Syy; # pacman -Su; # pacman -S jdk8-openjdk (or jre8-openjdk if you only need the JRE)

+1, this is (almost) the way I would do it. One note, do NOT do pacman -Syy , use pacman -Syu . Partial upgrades are unsupported.

Try the following command:

OpenJDK is a dependency on multiple Arch Linux packages so just installing Oracle’s JDK wasn’t enough.

Читайте также:  Linux run file as service

First had to remove icedtea-web

Then build Oracle JRE AUR package,

Before installing OracleJRE I had to remove openjdk6 manually and ignore dependencies:

[argy@Freak jre]$ sudo pacman -Rdd openjdk6 
sudo pacman -U jre-7u2-1-i686.pkg.tar.xz 

Build and Install JDK AUR package:

sudo pacman -U jdk-7u2-1-i686.pkg.tar.xz 

Logout and Login so the PATH gets updated and java is installed.

Please do not advise users to install unofficial packages right away while the piece of software OP is looking for is available in an official repo. OP should maybe just refresh the package lists first pacman -Sy . Answer from ilpianista is the correct one.

When you change your repository it is a good idea to update using pacman -Syyu as this will refresh all the packages.

RB based on armv6l. checking here you can see that there is not packaged version of openjdk for armv6l.

and here is what my arch on raspi shows

 [root@raspi ~]# pacman -Ss openjdk extra/openjdk6 6.b24_1.11.4-1 Free Java environment based on OpenJDK 6.0 with IcedTea6 replacing binary plugs. [root@raspi ~]# 

Or you may completely skip pacman and take full control:

  • Download the tar.gz of the JDK version you need from https://adoptopenjdk.net/
  • Expand the archive: tar zxvf OpenJDKxxx.ta.gz
  • Move the JDK to /opt : sudo mv jdk-xxx /opt
  • Update the PATH :
export JAVA_HOME=/opt/jdk-xxx export PATH=$PATH:$JAVA_HOME/bin 

This way you can install as many different versions of the JDK you want and switch between them by changing the value of PATH

Due to the current procedure of downloading and installing of Oracle JDK, you may not able to do that easily with linux environment. Because lots of previously supported JDK packages are not working now. if you wish to install Oracle JDK-8 on your arch-linux / manjaro machine, this gist will guide you well.

The solution will be briefly as below.

  1. First need to clone relevant JDK git to your PC. cd ~/Downloads && git clone https://aur.archlinux.org/jdk8.git
  2. 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/
  3. Now we will enter the jdk8 folder and should edit the PKGBUILD. cd jdk8 && nano PKGBUILD
  4. The source line we want to change from is. «https://download.oracle.com/otn-pub/java/jdk/$-$/$/$-$-linux-x64.tar.gz» to the filename we now have in folder, jdk-8u212-linux-x64.tar.gz
  5. Save and exit the PKGBUILD. Now we can build and install from within that directory. makepkg -sric
  6. If everything looks like it went fine you can just remove that directory when you are done. cd ~ && rm -r ~/Downloads/jdk8
Читайте также:  Создать загрузочную флешку uefi linux

Источник

Arch Linux User Repository

Direct downloads are no longer available. Create your Oracle account, download, and put in with the PKGBUILD.

New and improved. Now you can just download to ~/Downloads then run the update.

Latest Comments

DarkBrave commented on 2023-02-26 00:00 (UTC)

Java 8u361 has been released, so this package does not work right now for me.

Rain0073 commented on 2022-05-05 13:43 (UTC)

Hello, 8u333 has been released

dark_barker commented on 2022-01-19 11:05 (UTC) (edited on 2022-01-19 11:05 (UTC) by dark_barker)

_minor=’321′; _build=’b07′; _hash=’df5ad55fdd604472a86a45a217032c7d’

GenzoDany commented on 2021-11-22 21:53 (UTC)

_minor=’311′; _build=’b11′; _hash=’4d5417147a92418ea8b615e228bb6935′

Jark5455 commented on 2021-11-08 01:20 (UTC)

Hello, 8u311 has been released

cheezsteak commented on 2021-08-27 15:05 (UTC)

@xuelingkang yes, see the pinned comment.

xuelingkang commented on 2021-07-29 09:20 (UTC)

Is this package still being maintained?

xuelingkang commented on 2021-04-30 01:38 (UTC)

Hello, Oracle JDK 8u291 has been released.

severach commented on 2021-01-22 20:59 (UTC) (edited on 2021-01-22 21:00 (UTC) by severach)

@bartus The URL is valid. Look down the page and jdk8 is there. Oracle is constantly reworking the site and deep links often go bad. I try to use links that don’t go bad very often. I keep the Upstream URL maintained. That’s what I use to look for updates.

Copyright © 2004-2023 aurweb Development Team.

AUR packages are user produced content. Any use of the provided files is at your own risk.

Источник

Arch Linux User Repository

I have created the jdk8-temurin like you’ve said but still am not completely sure how I should be packaging it. Have a look and let me know what you think.

Читайте также:  Active boot disk linux

sergefan commented on 2021-12-11 02:29 (UTC)

Could you please bundle all these adopt java 8 packages into one? Something like jdk8-temurin? I guess Adoptium has released an all-in-one bundle. https://adoptium.net/?variant=openjdk8&jvmVariant=hotspot

marlor commented on 2021-11-28 16:03 (UTC)

By installing this package I get the message: «Could not generate information about jre8-adoptopenjdk» and the installation breaks

frealgagu commented on 2021-04-29 03:33 (UTC) (edited on 2021-04-29 03:33 (UTC) by frealgagu)

@bjorntj I think you modified the PKGBUILD file in the past. Depending of the AUR util you are using (of if you compile directly with makepkg) you must build the last package and upgrade it explicitly.

You could download the last compiled package from here: https://github.com/frealgagu/archlinux.java8-adoptopenjdk/releases/ and install it via

pacman --upgrade jre8-adoptopenjdk-headless-8u292-1-x86_64.pkg.tar.zst jre8-adoptopenjdk-8u292-1-x86_64.pkg.tar.zst jdk8-adoptopenjdk-8u292-1-x86_64.pkg.tar.zst 

bjorntj commented on 2021-04-28 13:02 (UTC)

jdk8-adoptopenjdk: local (8.u265-1) is newer than AUR (8u292-1)

frealgagu commented on 2021-02-22 20:14 (UTC)

I maintain the latest built package at:

Leeo97one commented on 2021-02-18 14:03 (UTC)

I no longer use the package, feel free to adopt it.

axzxc1236 commented on 2020-12-26 16:03 (UTC) (edited on 2020-12-26 16:09 (UTC) by axzxc1236)

Today I was poking around my AUR packages to check dynamic linking dependencies. I saw something that might have gone wrong.

Using ldd I saw things broken. for example

ldd /usr/lib/jvm/java-8-adoptopenjdk/lib/amd64/libjawt.so linux-vdso.so.1 (0x00007ffe49aea000) libawt.so => not found libawt_xawt.so => not found libjava.so => not found libjvm.so => not found libc.so.6 => /usr/lib/libc.so.6 (0x00007f7d6389d000) /usr/lib64/ld-linux-x86-64.so.2 (0x00007f7d63ca5000) 

Some libraries are missing, I personally didn’t encounter any problem though, this isn’t a problem with jdk-adoptopenjdk (Now provides Java 15) package.

Maybe this is fine. I say maybe because I am not a java expert.

Leeo97one commented on 2020-12-07 02:28 (UTC)

The packages have been updated, sorry for the delay!

Copyright © 2004-2023 aurweb Development Team.

AUR packages are user produced content. Any use of the provided files is at your own risk.

Источник

Оцените статью
Adblock
detector