backporting openjdk 21 GA to Ubuntu 23.04

Asked by Roy Ash

how can I install (via APT) OpenJDK 21 GA (build 35) in Ubuntu 23.04?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openjdk-21 Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Bernard Stafford (bernard010) said :
#1

It is in the regular repository.
https://packages.ubuntu.com/lunar/openjdk-21-jdk
The GA is: General-Availability Release
sudo apt install openjdk-21-jdk

Revision history for this message
Roy Ash (silverfire) said (last edit ):
#2

no.. on Ubuntu 23.04 I did the dollowing:
```bash
apt info openjdk-21-jdk
```

and got:

Package: openjdk-21-jdk
Version: 21~14ea~us1-0ubuntu1
Priority: optional
Section: universe/java
Source: openjdk-21
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: OpenJDK Team <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 108 kB
Provides: java-compiler, java-sdk, java10-sdk, java11-sdk, java12-sdk, java13-sdk, java14-sdk, java15-sdk, java16-sdk, java17-sdk, java18-sdk, java19-sdk, java2-sdk, java20-sdk, java21-sdk, java5-sdk, java6-sdk, java7-sdk, java8-sdk, java9-sdk
Depends: openjdk-21-jre (= 21~14ea~us1-0ubuntu1), openjdk-21-jdk-headless (= 21~14ea~us1-0ubuntu1), libc6 (>= 2.34)
Recommends: libxt-dev
Suggests: openjdk-21-demo, openjdk-21-source, visualvm
Homepage: https://openjdk.java.net/
Download-Size: 10.8 kB
APT-Manual-Installed: yes
APT-Sources: http://ports.ubuntu.com/ubuntu-ports lunar/universe arm64 Packages
Description: OpenJDK Development Kit (JDK)
 OpenJDK is a development environment for building applications,
 applets, and components using the Java programming language.

as you can see, the version is 21~14ea~us1-0ubuntu1, I want build 35, not 14

Revision history for this message
Bernard Stafford (bernard010) said :
#3

Bernard Stafford suggests this article as an answer to your question:
The openjdk-21 release is in the repository is the current release.
Ubuntu copies there files from Debian to avoid duplication.
FAQ #3037: “no rolling release”.

Revision history for this message
Bernard Stafford (bernard010) said :
#4

https://www.oracle.com/java/technologies/downloads/
There is the latest release of JDK 21 from oracle in a x64 Debian package.
If this helps, it was released Sept. 2023

Revision history for this message
Roy Ash (silverfire) said :
#5

https://www.oracle.com/java/technologies/downloads/ doesn't help me much casus I have a Raspberry Pi and there isn't a Debian package link for ARM64…

Regarding FAQ #3037, it does explain, I didn't thought about the option that OpenJDK 21 build 14 was released when (or before) Ubuntu 21.04 got released…

Revision history for this message
Roy Ash (silverfire) said :
#6

Thanks Bernard Stafford, that solved my question.

Revision history for this message
Bernard Stafford (bernard010) said (last edit ):
#7

https://www.oracle.com/java/technologies/downloads/
ARM64 Compressed Archive is a .tar.gz file that is available.
https://linuxconfig.org/how-to-install-tar-gz-file-on-linux
According to the changelogs OpenJDK 21 snapshot, Build 14 -Fri, 17 Mar 2023

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

There is Bug #2036873 with a request to backport openjdk 21 (version 21+35-1) to focal (20.04) and jammy (22.04).
I suggest that you add a request to do a similar action (which in in this case is a version upgrade) also for lunar (23.04).

Revision history for this message
Roy Ash (silverfire) said :
#9

which similar action?

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#10

Bug #2036873 is a request to backport openjdk-21 version 21+35-1 to jammy and focal.

What you want is a backport of that version also to lunar. That's what I meant with "similar action".

My advice is that you add a comment to the bug report, stating that this version should also be made available for Ubuntu 23.04.
In my opinion, this is even a prerequisite for the backport to jammy and focal, see https://wiki.ubuntu.com/UbuntuBackports#Preparing_the_Backported_Package

There is another option to receive openjdk-21 version 21+35-1: do an upgrade to Ubuntu 23.10 (currently in "beta" status, to be published in two weeks' time)

Revision history for this message
Roy Ash (silverfire) said :
#11

Thanks Manfred Hampl, that solved my question.