JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 24.05.2020, 00:05
thetoad thetoad is offline
Tornado
 
Join Date: Jan 2014
Posts: 229
Default how does jd2 pick which jre to run?

for the longest time I was running jd2 with the 1.7 jre that came with it when I installed. recently saw a thread that I should delete the jre dir to use the more up to date system jre, so I did.

however, it's not really using the system jre on my ubuntu installation. I have 2 JREs installed, a somewhat older oracle 1.8 installation and a system 1.11 installation, both are setup under their respecitive directories in /usr/lib/jvm/ but 1.11 is setup as the default in the path (i.e. java -version is 1.11). But it seems like jd2 is running it 1.8 by using it's java home directly.

any idea why this might be happening?
Reply With Quote
  #2  
Old 25.05.2020, 15:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

Check/See the JDownloader.sh launcher script.

JDownloader comes with optional bundled jre. By rename/remove the jre/java folder in JDownloader folder, the launcher will try to find/use system one.
You can also just start JDownloader manually via
java -jar JDownloader.jar
commandline
It may be that the old launcher scripts prefers/only works with Java up to 1.8
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 27.05.2020, 08:43
thetoad thetoad is offline
Tornado
 
Join Date: Jan 2014
Posts: 229
Default

so, it doesn't seem to play nice with java11.

look at my install4j file it creates

Code:
JRE_VERSION	/usr	11	0	7	0
JRE_INFO	/usr	110
JRE_VERSION	/usr/lib/jvm/java-1.11.0-openjdk-amd64	11	0	7	0
JRE_INFO	/usr/lib/jvm/java-1.11.0-openjdk-amd64	110
JRE_VERSION	/usr/lib/jvm/java-11-openjdk-amd64	11	0	7	0
JRE_INFO	/usr/lib/jvm/java-11-openjdk-amd64	110
JRE_VERSION	/usr/lib/jvm/java-8-oracle	1	8	0	201
JRE_INFO	/usr/lib/jvm/java-8-oracle
it doesn't seem to like 11 as he "major" number, it only wants a 1 there. i.e. it choses the java8 jvm instead of the 11. However, when I manuallychange it to

Code:
JRE_VERSION	/usr	11	0	7	0
JRE_INFO	/usr	110
JRE_VERSION	/usr/lib/jvm/java-1.11.0-openjdk-amd64	1	11	0	7	0
JRE_INFO	/usr/lib/jvm/java-1.11.0-openjdk-amd64	0
JRE_VERSION	/usr/lib/jvm/java-11-openjdk-amd64	11	0	7	0
JRE_INFO	/usr/lib/jvm/java-11-openjdk-amd64	110
JRE_VERSION	/usr/lib/jvm/java-8-oracle	1	8	0	201
JRE_INFO	/usr/lib/jvm/java-8-oracle	0
(i.e. see second JRE_VERSION/INFO set), it runs with java11.

however, it throws this warning on startup

Code:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.appwork.shutdown.ShutdownController (file:/home/spotter/jd2/JDownloader.jar) to field java.lang.ApplicationShutdownHooks.hooks
WARNING: Please consider reporting this to the maintainers of org.appwork.shutdown.ShutdownController
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Reply With Quote
  #4  
Old 27.05.2020, 12:30
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

The launcher was build at a time where Java9 was still in development And lots has changed with newer java versions, so most likely that's why the launcher prefers/tries to use Java8. Basically you've *renamed* Java 11 to 1.11 which is larger than 1.8 *dirty hack*. A newer created install4j launcher should handle newer jvm just fine

Warnings with Java>1.8 are okay as internal Java stuff has changed.
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 27.05.2020 at 12:51.
Reply With Quote
  #5  
Old 27.05.2020, 17:55
thetoad thetoad is offline
Tornado
 
Join Date: Jan 2014
Posts: 229
Default

I'd have thought that java 11.0 would be greater than java 1.8 as well. was confused why it wasn't taking it (it tried it first, but ignored it. anyways, it was just a note for others that might end up in this position (and as a record for me if I forget and it happens again)
Reply With Quote
  #6  
Old 27.05.2020, 18:02
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,290
Default

That is one of the main problems with JVM version numbering changes. The old launcher /jvm version numbering always had 1.X so 11 is invalid one
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 03:53.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.