Synology: Java-Installer 2.16 sets wrong JAVA_HOME path?
Posted: 01 Jul 2021, 12:50
Hi rednoah,
I'm pspzockerscene - JDownloader Community Manager & Supporter.
First of all thanks for the continuous work on your Synology Java-Installer - it has helped a lot of our users to setup JD more easily and we've even linked it in parts of our installation instructions.
While a lot of JD users are using your Filebot tool I admit I'm not a filebot user but nevertheless I'm here to ask a question/report a bug
After the update from Java-Installer 2.13 to 2.16, I noticed an issue (on DSM 6.2.4-25556):
The "JAVA_HOME" path was invalid all of the sudden.
In my case, it pointed to "/user/local/java" while the correct path seemed to be "/usr/local/bin/java".
I've checked this against uninstalling your package, installing the official Java8 package from Synology which provided a working JAVA_HOME path again.
After a reboot, I was able to start JDownloader again.
Some of our users have reported this issue in our orums too:
https://board.jdownloader.org/showthread.php?t=87688
and:
https://board.jdownloader.org/showthrea ... 99&page=59
On top of that, from what I've read the new Synology DSM7 will not provide an official/easy to install Java Package anymore so chances are high that more of our users will run into this issue soon...
I've checked your "get-java.sh" script but I wasn't able to find out any reason as why the path should be wrong with:
https://github.com/rednoah/java-install ... et-java.sh
Looking at the relevant parts of the "/etc/profile" file, this is how it looks here and it will work fine as long as "Java8" is installed via official Synology package:
What might also be a source of error:
Neither Java-Installer nor the official Synology Java will edit the "profile" file on uninstall.
So my questions are:
Is this a Java-Installer related issue?
Aren't other Java Apps running on Synology also affected by this issue?
Is the usage of that path inside JDownloaders "vstart-stop-script" maybe problematic?
Best regards,
pspzockerscene
I'm pspzockerscene - JDownloader Community Manager & Supporter.
First of all thanks for the continuous work on your Synology Java-Installer - it has helped a lot of our users to setup JD more easily and we've even linked it in parts of our installation instructions.
While a lot of JD users are using your Filebot tool I admit I'm not a filebot user but nevertheless I'm here to ask a question/report a bug

After the update from Java-Installer 2.13 to 2.16, I noticed an issue (on DSM 6.2.4-25556):
The "JAVA_HOME" path was invalid all of the sudden.
In my case, it pointed to "/user/local/java" while the correct path seemed to be "/usr/local/bin/java".
I've checked this against uninstalling your package, installing the official Java8 package from Synology which provided a working JAVA_HOME path again.
After a reboot, I was able to start JDownloader again.
Some of our users have reported this issue in our orums too:
https://board.jdownloader.org/showthread.php?t=87688
and:
https://board.jdownloader.org/showthrea ... 99&page=59
On top of that, from what I've read the new Synology DSM7 will not provide an official/easy to install Java Package anymore so chances are high that more of our users will run into this issue soon...
I've checked your "get-java.sh" script but I wasn't able to find out any reason as why the path should be wrong with:
https://github.com/rednoah/java-install ... et-java.sh
Looking at the relevant parts of the "/etc/profile" file, this is how it looks here and it will work fine as long as "Java8" is installed via official Synology package:
Code: Select all
export JAVA_HOME=/usr/local/java # added by Java Installer
export LANG=en_US.utf8 # added by Java Installer
PATH=$PATH:/var/packages/Java8/target/j2sdk-image/bin # Synology Java runtime enviroment
PATH=$PATH:/var/packages/Java8/target/j2sdk-image/jre/bin # Synology Java runtime enviroment
JAVA_HOME=/var/packages/Java8/target/j2sdk-image/jre # Synology Java runtime enviroment
CLASSPATH=.:/var/packages/Java8/target/j2sdk-image/jre/lib # Synology Java runtime enviroment
LANG=en_US.utf8 # Synology Java runtime enviroment
export CLASSPATH PATH JAVA_HOME LANG # Synology Java runtime enviroment
Neither Java-Installer nor the official Synology Java will edit the "profile" file on uninstall.
So my questions are:
Is this a Java-Installer related issue?
Aren't other Java Apps running on Synology also affected by this issue?
Is the usage of that path inside JDownloaders "vstart-stop-script" maybe problematic?
Best regards,
pspzockerscene