Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
jdk/jre icedtea confusion with packages that want any jre?
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
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9714
Location: almost Mile High in the USA

PostPosted: Tue Oct 31, 2023 4:09 pm    Post subject: jdk/jre icedtea confusion with packages that want any jre? Reply with quote

I installed dev-java/icedtea-bin-3.16.0 for using out-of-portage mkgmap and it installed virtual/jre-1.8.0-r3 and virtual/jdk-1.8.0-r6 as it should.

I subsequently installed sci-geosciences/josm-bin (source code has apache license btw, but nevermind that as this is a bytecode compiled java program) which has the requirement of >=virtual/jre-1.8 which icedtea-bin satisfies so I didn't see anything strange going on.

However now if I do a world update, it notices that it wants >=virtual/jre-1.8 so ... hey, virtual/jre-17 meets this requirement and is stable, but there is no icedtea that fits this. Therefore it unneedingly wants to install openjdk-17 along with leaving icedtea alone. For me, having both JRE's is redundant -- one or the other is enough.

So is icedtea becoming deprecated and we should be using openjdk, or will I have to add a manual mask to block out >virtual/jre-2 so virtual/jre-1.8 will remain being the main and active JRE, and stop installing the redundant openjdk-17?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31019
Location: here

PostPosted: Tue Oct 31, 2023 5:35 pm    Post subject: Reply with quote

IcedTea support only java 8, if you want jre-17 you should install openjdk or openjdk-bin.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9714
Location: almost Mile High in the USA

PostPosted: Tue Oct 31, 2023 6:09 pm    Post subject: Reply with quote

I guess it's also a "if it works don't fix it" ... mkgmap and josm seem to work fine with java8/icedtea. I suppose the proper solution really is to just upgrade to openjdk 17 and hope things just work?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31019
Location: here

PostPosted: Tue Oct 31, 2023 6:20 pm    Post subject: Reply with quote

Usually backward compatibility works with java.
So if you use a new virtual machine you can run code compiled with older jdk, not vice versa.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9714
Location: almost Mile High in the USA

PostPosted: Tue Oct 31, 2023 9:12 pm    Post subject: Reply with quote

hmm... probably should go ahead and try a new jre and ditch icedtea... now why has icedtea been kept so long if the new JREs can run old bytecode just fine...?
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31019
Location: here

PostPosted: Wed Nov 01, 2023 8:34 am    Post subject: Reply with quote

I think it is related to the fact that back in the day, although released open source the code, some components were proprietary like JavaWebStart or sound support.
This did not allow the software to be compiled with other open source software, so IcedTea implements these parts with dev-java/icedtea-web and dev-java/icedtea-sound.
Over time these problems were solved (JavaWebStart is deprecated) and today OpenJDK is released under GPL-2 with classpath exception.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Wed Nov 01, 2023 10:06 am    Post subject: Reply with quote

emerge --deselect icedtea-bin should solve your issue.

ARAIR icedtea is a build bootstrapped completely with free software, because at that time there were some proprietary parts of JDK. I think we won't see another release of icedtea as AFAIK all parts of jdk are now open source.

Best Regards,
Georgi
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9714
Location: almost Mile High in the USA

PostPosted: Thu Nov 02, 2023 8:14 am    Post subject: Reply with quote

Might just be time to ditch icedtea then...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Thu Nov 02, 2023 9:25 am    Post subject: Reply with quote

eccerr0r wrote:
Might just be time to ditch icedtea then...


I might have mislead you, I see the github repo is alive and well. They are currently working on IcedTea-16 which supports Java 21. I'm not sure what Gentoo Java team thinks about the future of icedtea in Gentoo, maybe ask them in #gentoo-java@Libera.Chat.

However I'm pretty sure everything you need can be done by openjdk-bin.

Best Regards,
Georgi
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9714
Location: almost Mile High in the USA

PostPosted: Thu Nov 02, 2023 2:24 pm    Post subject: Reply with quote

what the heck... now what's the value proposition of icedtea...
I thought I chose icedtea way back because it was mostly OSS. Now what are they doing if openjdk is likewise ...

I ended up flipping to openjdk-17 on one machine and fortunately things are still working,..
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Thu Nov 02, 2023 2:51 pm    Post subject: Reply with quote

eccerr0r wrote:
what the heck... now what's the value proposition of icedtea...
I thought I chose icedtea way back because it was mostly OSS. Now what are they doing if openjdk is likewise ...

I ended up flipping to openjdk-17 on one machine and fortunately things are still working,..


According to Wikipedia it provides some stuff others don't, but that information is outdated. I'm pretty sure you would know if you needed something that the others don't have.

Best Regards,
Georgi
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 31019
Location: here

PostPosted: Thu Nov 02, 2023 3:47 pm    Post subject: Reply with quote

eccerr0r wrote:
I ended up flipping to openjdk-17 on one machine and fortunately things are still working,..

It is not luck as mentioned the java vm can execute bytecode compiled with versions of java less than or equal to its version.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9714
Location: almost Mile High in the USA

PostPosted: Thu Nov 02, 2023 6:41 pm    Post subject: Reply with quote

As with any upgrade there's always a chance of breaking something, maybe not so with javavm, but emerge definitely can break stuff :)
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
logrusx
Veteran
Veteran


Joined: 22 Feb 2018
Posts: 1751

PostPosted: Fri Nov 03, 2023 6:21 am    Post subject: Reply with quote

fedeliallalinea wrote:
eccerr0r wrote:
I ended up flipping to openjdk-17 on one machine and fortunately things are still working,..

It is not luck as mentioned the java vm can execute bytecode compiled with versions of java less than or equal to its version.


That's not completely correct. While it holds true for the bytecode itself, libraries change, things get deprecated and removed and quite a lot is gone between Java 8 and 17.

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