#1
|
|||
|
|||
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? |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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 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 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 |
#4
|
||||
|
||||
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 11:51. |
#5
|
|||
|
|||
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)
|
#6
|
||||
|
||||
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 |
Thread Tools | |
Display Modes | |
|
|