UPDATE 2 – Now running on PowerPC 2010 Synology models running DSM 5.0 beta!
UPDATE – Now running on Armada 370/XP (ARMv7) and Intel Atom Evansport CPUs, as used in some x14 series Synology models!
There is a lot of good Java software, but it’s difficult to get Java running on a NAS. I decided to do something about that, mainly to pave the way for a Serviio package that didn’t require a huge guide to install. To stay legal, I followed how QNAP packaged Java for their NAS products. The Java binaries cannot be redistributed so this package looks for the downloaded .tar.gz archive in the public shared folder on the NAS. The end user is required to register with Oracle to get the file, as you can see from the description below. I also added locale support to the underlying Linux since Java requires this for UTF-8 support when reading from the filesystem.
Only Marvell Kirkwood, Marvell Armada 370/XP, Intel, and Freescale QorIQ PowerPC CPUs are supported, so please check which CPU your NAS has. Java 7 for Intel Atom CPU does not currently work on Synology, so Intel users are limited to Java 6. I don’t have an Intel syno so it’s not something I can investigate I’m afraid. Though Oracle have published a JRE for PowerPC, it does not work on the older PowerQUICC PowerPC synos owing to their DSM version of glibc not being recent enough (2.3.4, but Oracle’s Java needs 2.4). It is possible to run CrashPlan on those, but it requires chroot-ing to a Debian install which can get complicated. Christophe from chreggy.fr has recently released packages to automate this.
- If you have a multi-bay NAS, use the Shared Folder control panel to create a shared folder called public (it must be all lower case). On single bay models this is created by default. Assign it with Read/Write privileges for everyone.
- Register with Oracle and download Java SE for Embedded 7 for either ARMv5, ARMv7 Headless Server, or PowerPC e500v2 as appropriate (Intel NAS users will need the end-of-life Java SE for Embedded 6), and save in the public shared folder. If the file isn’t found an error message will display the full expected filename. You cannot use a different version by renaming it, since the folder structure inside the archive will be different.
- Install the Java package from the DSM Package Center. In Settings -> Package Sources add my package repository URL which is http://packages.pcloadletter.co.uk. My packages will appear in the Community section once the repo URL is added.
- If you have trouble getting the Java archive recognised, try downloading it with a different web browser. Some browsers try to help by uncompressing the file, or renaming it without warning. I have tried to code around most of these behaviours.
- The package does not need to start, just installing it is sufficient.
- If you update DSM later, you will need to re-install this package or else UTF-8 and locale support will be broken by the update.
For information, here are the package scripts so you can see what it’s going to do. You can learn more about how Synology packages work by reading the Synology Package wiki.
- 0022 Updated to Java 7u51
- 0021 Locale support is no longer downloaded and added to DSM 4.3 or newer since it’s already present
- 0020 Added support for Intel Atom Evansport and Armada XP CPUs in new DSx14 products, removed Early Access JDK 8 support since it did not run on the Armada SoCs
- 0019 Updated to Java 7u45
- 0018 Updated to Java 7u40, and JDK8 Early Access b106
- 0017 For Armada370 CPU changed from ARMv7 Server JVM to Client JVM since the Server one turned out to be unstable. Added support for Early Access JDK 8 for Armada 370.
- 0016 Added Armada370 CPU support (DS213j)
- 0015 Updated to Java 7u21, Java 6 Embedded seems to be no longer maintained by Oracle
- 0014 Fixed metadata for DSM 4.2 Package Center
- 013 Updated to Java 6u38 and Java 7u10
- 012 Installer script fetches native binaries separately to reduce bandwidth on repo hosting
- 011 Added support for Freescale QorIQ PowerPC CPUs used in some Synology x13 series products, PowerQUICC PowerPC processors in previous Synology generations with older glibc versions are not supported
- 010 updated to Java 6u34 and Java 7u6
- 009 corrected timezone bug for Atlantic and Pacific timezones which may have caused error messages when in fact the package had installed correctly
- 008 unified the build scripts
- 007 included the locale binaries to simplify installation, fixed environment variables for root user (inc. timezone with DST support), displayed Java version information and env vars in Log tab, incremented Java to latest versions 6u32 and 7u4, fixed detection of renamed .tar.gz archives downloaded by Google Chrome
- 006 fixed path issue for root user on non-bootstrapped systems, updated info link to refer back to this page, and improved description text
- 005 incremented JRE versions to match new releases from Oracle
- 004 forced check for existence of ‘public’ shared folder
- 003 fixed a stupid typo that stopped 002 from working :)
- 002 rewrote scripts to be easier to maintain, and to allow for web browsers that untar or rename the Java and toolchain binary bundles as they’re saved
- 001 fixed package repo support, defined as a non-runnable service, prevented more than one JRE being installed, saved files into actual package folder rather than @appstore/java now that package names can be separate from Package Center display names
- v3 initial spk release (I think!)