Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to install non LTS Java SDK?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
strm
n00b
n00b


Joined: 26 Dec 2024
Posts: 9

PostPosted: Fri Jan 24, 2025 3:05 pm    Post subject: How to install non LTS Java SDK? Reply with quote

Hello everyone,

I am a Java developer and sometimes need the latest JDK release (not beta) version to test things. Thus, I wonder how to install JDK 23 on a Gentoo machine? There only seem to be LTS ebuilds. Do I need to manually install a bin pkg? If so, how to integrate with eselect java-vm ?

Thx for hints!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54759
Location: 56N 3W

PostPosted: Fri Jan 24, 2025 3:53 pm    Post subject: Reply with quote

strm,

Code:
$ eix virtual/jdk
* virtual/jdk
     Available versions: 
     (1.8)  1.8.0-r9
     (11)   11-r2
     (17)   17
     (21)   21
     (25)   **25-r1
       {headless-awt}
     Description:         Virtual for Java Development Kit (JDK)


Gentoo has 25-r1 in the tree but masked. If you unmask it and maybe keyword it, you can try to install it.
If it breaks, report bugs. Someone needs to be first.

Poking about in git,
Code:
commit 1e7f114f8fe4cf367af17556cac40620ce6bed48
Author: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Date:   Thu Dec 12 18:20:44 2024 +0100

    virtual/jdk: drop 23
   
    Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
    Closes: https://github.com/gentoo/gentoo/pull/39713
    Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>


virtual/jdk-23 was dropped on 12 Dec 2024 but you can get it back and put it in your local overlay if you really want to.
Note that virtual/jdk will give you a choice between openjdk and openjdk-bin, so you will need the matching openjdk or openjdk-bin ebuilds too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
strm
n00b
n00b


Joined: 26 Dec 2024
Posts: 9

PostPosted: Fri Jan 24, 2025 7:25 pm    Post subject: Reply with quote

There is a difference between various Java versions, so I'd really like not to use 25.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54759
Location: 56N 3W

PostPosted: Fri Jan 24, 2025 7:48 pm    Post subject: Reply with quote

strm,

Dig 23 out of the git repo os a squashfs snapshot and add it to your local overlay.
You need a git checkout dated before Thu Dec 12 18:20:44 2024 +0100, or a whole portage tree
That link is to a lzo.sqfs portage snapshot. That will require kernel support. Its also available with xz compression. Again, kernel support required.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2647

PostPosted: Fri Jan 24, 2025 9:03 pm    Post subject: Reply with quote

Download a binary build from oracle, extract in your home directory, adjust PATH, set JAVA_HOME and you're good to go. Even easier, just add it to your IDE and directly use it that way.

You need it through portage only when the system uses it. Otherwise local install in your home directory is fine for development.

Best Regards,
Georgi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum