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. In compliance with the Oracle EULA 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 (DSM 4.3 later included this). Timezone support is also configured.
This package installs Java SE Embedded which is purposefully designed to run on low specification headless hardware. It should be noted that Synology Java Manager (only available on Intel products) is the full Java Runtime Environment, and consequently uses more RAM. By default you should use Java 8, unless the application you want to run specifically requires Java 7.
Please note that Oracle ceased maintaining Java 6 in 2012, so it should be considered a serious security vulnerability. The Java 6 package has been withdrawn from the package repository for this reason. If you need it to run a particular piece of software you may download it here for manual installation. Please also note that Oracle retired support for PowerPC CPUs following Java 8 Update 6, so the PowerPC package remains at that version.
Instructions
- In Synology DSM’s Package Center, click Settings and add my package repository:
- The repository will push its certificate automatically to the NAS, which is used to validate package integrity. Set the Trust Level to Synology Inc. and trusted publishers:
- Now browse the Community section in Package Center to install a Java SE Embedded package:
The repository only displays packages which are compatible with your specific model of NAS. If you don’t see Java Embedded in the list, then either your NAS model or your DSM version are not supported at this time. - 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 the appropriate version of Java SE Embedded for your CPU architecture and save in the public shared folder on your NAS. Note that to get any version of Java older than the current one you will need to follow the Oracle Java SE Embedded Downloads Archive link on that page. If in doubt, attempt to install the package first, and the error message will tell you which specific download version is required.
- 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. Use Firefox if all else fails.
Package scripts
For information, here are the package scripts so you can see what it’s going to do. You can get more information about how packages work by reading the Synology 3rd Party Developer Guide.
installer.sh
#!/bin/sh #--------JAVA installer script #--------package maintained at pcloadletter.co.uk COMMENT="# Synology Java Package" SYNO_CPU_ARCH="`uname -m`" [ "`echo ${SYNO_CPU_ARCH} | cut -c1-7`" == "armv5te" ] && SYNO_CPU_ARCH="armv5tel" #--------Synology switched Armada 370 systems from SoftFP to HardFP EABI for DSM 6.0 [ "${SYNOPKG_DSM_ARCH}" == "armada370" ] && [ ${SYNOPKG_DSM_VERSION_MAJOR} -gt 5 ] && SYNO_CPU_ARCH="armv7l-hflt" [ "${SYNOPKG_DSM_ARCH}" == "armada375" ] && SYNO_CPU_ARCH="armv7l-hflt" [ "${SYNOPKG_DSM_ARCH}" == "armada38x" ] && SYNO_CPU_ARCH="armv7l-hflt" [ "${SYNOPKG_DSM_ARCH}" == "comcerto2k" ] && SYNO_CPU_ARCH="armv7l-hflt" [ "${SYNOPKG_DSM_ARCH}" == "alpine" ] && SYNO_CPU_ARCH="armv7l-hflt" [ "${SYNOPKG_DSM_ARCH}" == "alpine4k" ] && SYNO_CPU_ARCH="armv7l-hflt" [ "${SYNOPKG_DSM_ARCH}" == "monaco" ] && SYNO_CPU_ARCH="armv7l-hflt" [ "${SYNOPKG_DSM_ARCH}" == "x86_64" ] && [ "${WIZARD_JRE_EE}" == "true" ] && SYNO_CPU_ARCH="i686" [ "${SYNOPKG_DSM_ARCH}" == "x86_64" ] && [ ${SYNOPKG_DSM_VERSION_MAJOR} -lt 6 ] && SYNO_CPU_ARCH="i686" if [ "${SYNOPKG_PKGNAME}" == "java6" ]; then DOWNLOAD_URL="http://tinyurl.com/javaembedarchive" EXTRACTED_FOLDER="ejre1.6.0_38" JCE_BINARY="jce_policy-6.zip" JCE_URL="http://tinyurl.com/java-jce6" JCE_FOLDER="jce" if [ "`echo ${SYNO_CPU_ARCH} | cut -c1-7`" == "armv5te" ]; then JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.tar.gz" JAVA_BUILD="ARMv5 Linux - Headless EABI" elif [ "${SYNO_CPU_ARCH}" == "armv7l" ]; then JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-arm-vfp-eabi-headless-13_nov_2012.tar.gz" JAVA_BUILD="ARMv6/7 Linux - Headless EABI, VFP, SoftFP ABI, Little Endian" elif [ "${SYNO_CPU_ARCH}" == "i686" ]; then JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-i586-headless-13_nov_2012.tar.gz" JAVA_BUILD="x86 Linux Small Footprint - Headless" elif [ "${SYNO_CPU_ARCH}" == "x86_64" ]; then JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-i586-headless-13_nov_2012.tar.gz" JAVA_BUILD="x86 Linux Small Footprint - Headless" elif [ "${SYNO_CPU_ARCH}" == "ppc" ]; then JAVA_BINARY="ejre-1_6_0_38-fcs-b05-linux-ppc-e500v2-headless-13_nov_2012.tar.gz" JAVA_BUILD="Power Architecture Linux - Headless - e500v2 core" fi elif [ "${SYNOPKG_PKGNAME}" == "java7" ]; then DOWNLOAD_URL="http://tinyurl.com/javaembed" EXTRACTED_FOLDER="ejre1.7.0_75" JCE_BINARY="UnlimitedJCEPolicyJDK7.zip" JCE_URL="http://tinyurl.com/java-jce7" JCE_FOLDER="UnlimitedJCEPolicy" if [ "${SYNO_CPU_ARCH}" == "armv5tel" ]; then JAVA_BINARY="ejre-7u75-fcs-b13-linux-arm-sflt-headless-18_dec_2014.tar.gz" JAVA_BUILD="ARMv5 Linux - Headless EABI, SoftFP ABI, Little Endian" elif [ "${SYNO_CPU_ARCH}" == "armv7l" ]; then JAVA_BINARY="ejre-7u75-fcs-b13-linux-arm-vfp-sflt-client_headless-18_dec_2014.tar.gz" JAVA_BUILD="ARMv6/7 Linux - Headless - Client Compiler EABI, VFP, SoftFP ABI, Little Endian" elif [ "${SYNO_CPU_ARCH}" == "armv7l-hflt" ]; then JAVA_BINARY="ejre-7u75-fcs-b13-linux-arm-vfp-hflt-client_headless-18_dec_2014.tar.gz" JAVA_BUILD="ARMv6/7 Linux - Headless - Client Compiler EABI, VFP, HardFP ABI, Little Endian" elif [ "${SYNO_CPU_ARCH}" == "i686" ]; then JAVA_BINARY="ejre-7u75-fcs-b13-linux-i586-headless-18_dec_2014.tar.gz" JAVA_BUILD="x86 Linux Small Footprint - Headless" elif [ "${SYNO_CPU_ARCH}" == "x86_64" ]; then JAVA_BINARY="ejre-7u75-fcs-b13-linux-i586-headless-18_dec_2014.tar.gz" JAVA_BUILD="x86 Linux Small Footprint - Headless" elif [ "${SYNO_CPU_ARCH}" == "ppc" ]; then JAVA_BINARY="ejre-7u75-fcs-b13-linux-ppc-e500v2-headless-18_dec_2014.tar.gz" JAVA_BUILD="Power Architecture Linux - Headless - e500v2 with double-precision SPE Floating Point Unit" fi elif [ "${SYNOPKG_PKGNAME}" == "java8" ]; then DOWNLOAD_URL="http://tinyurl.com/javaembed" EXTRACTED_FOLDER="ejdk1.8.0_211" JCE_BINARY="jce_policy-8.zip" JCE_URL="http://tinyurl.com/java-jce8" JCE_FOLDER="UnlimitedJCEPolicyJDK8" if [ "${SYNO_CPU_ARCH}" == "armv5tel" ]; then JAVA_BINARY="ejdk-8u211-linux-arm-sflt.tar.gz" JAVA_BUILD="ARMv5/ARMv6/ARMv7 Linux - SoftFP ABI, Little Endian 2" elif [ "${SYNO_CPU_ARCH}" == "armv7l" ]; then JAVA_BINARY="ejdk-8u211-linux-arm-sflt.tar.gz" JAVA_BUILD="ARMv5/ARMv6/ARMv7 Linux - SoftFP ABI, Little Endian 2" elif [ "${SYNO_CPU_ARCH}" == "armv7l-hflt" ]; then JAVA_BINARY="ejdk-8u211-linux-armv6-vfp-hflt.tar.gz" JAVA_BUILD="ARMv6/ARMv7 Linux - VFP, HardFP ABI, Little Endian 1" elif [ "${SYNO_CPU_ARCH}" == "aarch64" ]; then JAVA_BINARY="jdk-8u211-linux-arm64-vfp-hflt.tar.gz" JAVA_BUILD="Linux ARM 64 Hard Float ABI" DOWNLOAD_URL="http://tinyurl.com/java8arm64" EXTRACTED_FOLDER="jdk1.8.0_211" elif [ "${SYNO_CPU_ARCH}" == "i686" ]; then JAVA_BINARY="ejdk-8u211-linux-i586.tar.gz" JAVA_BUILD="x86 Linux Small Footprint - Headless" elif [ "${SYNO_CPU_ARCH}" == "x86_64" ]; then JAVA_BINARY="jre-8u211-linux-x64.tar.gz" JAVA_BUILD="Linux x64" EXTRACTED_FOLDER="jre1.8.0_211" DOWNLOAD_URL="http://tinyurl.com/java8x64" elif [ "${SYNO_CPU_ARCH}" == "ppc" ]; then #Oracle have discontinued Java 8 for PowerPC after update 6 JAVA_BINARY="ejdk-8u6-fcs-b23-linux-ppc-e500v2-12_jun_2014.tar.gz" JAVA_BUILD="Power Architecture Linux - Headless - e500v2 with double-precision SPE Floating Point Unit" EXTRACTED_FOLDER="ejdk1.8.0_06" fi fi JAVA_BINARY=`echo ${JAVA_BINARY} | cut -f1 -d'.'` PUBLIC_FOLDER="`synoshare --get public | sed -r "/Path/!d;s/^.*\[(.*)\].*$/\1/"`" TEMP_FOLDER="`find / -maxdepth 2 -path '/volume?/@tmp' | head -n 1`" NATIVE_BINS_URL="http://packages.pcloadletter.co.uk/downloads/java-native-${SYNO_CPU_ARCH}.tar.xz" NATIVE_BINS_FILE="`echo ${NATIVE_BINS_URL} | sed -r "s%^.*/(.*)%\1%"`" #DSM versions older than 4.3 need locale support adding, don't download unless needed [ ! -e /usr/bin/locale ] && INSTALL_FILES="${NATIVE_BINS_URL}" source /etc/profile preinst () { synoshare -get public > /dev/null || ( echo "A shared folder called 'public' could not be found - note this name is case-sensitive. " >> $SYNOPKG_TEMP_LOGFILE echo "Please create this using the Shared Folder DSM Control Panel and try again." >> $SYNOPKG_TEMP_LOGFILE exit 1 ) JAVA_BINARY_FOUND= if [ -n "${JAVA_HOME}" ]; then echo "It seems from /etc/profile that a Java Runtime is already installed at ${JAVA_HOME}. Uninstall it and try again." >> $SYNOPKG_TEMP_LOGFILE exit 1 fi [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.gz ] && JAVA_BINARY_FOUND=true [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar ] && JAVA_BINARY_FOUND=true [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.tar ] && JAVA_BINARY_FOUND=true [ -f ${PUBLIC_FOLDER}/${JAVA_BINARY}.gz ] && JAVA_BINARY_FOUND=true if [ -z ${JAVA_BINARY_FOUND} ]; then echo "Java binary bundle not found. " >> $SYNOPKG_TEMP_LOGFILE echo "I was expecting the file ${PUBLIC_FOLDER}/${JAVA_BINARY}.tar.gz. " >> $SYNOPKG_TEMP_LOGFILE echo "Please agree to the Oracle licence at ${DOWNLOAD_URL}, then download the '${JAVA_BUILD}' package" >> $SYNOPKG_TEMP_LOGFILE echo "and place it in the 'public' shared folder on your NAS. This download cannot be automated even if " >> $SYNOPKG_TEMP_LOGFILE echo "displaying a package EULA could potentially cover the legal aspect, because files hosted on Oracle's " >> $SYNOPKG_TEMP_LOGFILE echo "server are protected by a session cookie requiring a JavaScript enabled browser." >> $SYNOPKG_TEMP_LOGFILE exit 1 fi if [ "${WIZARD_JCE_UL}" == "true" ]; then if [ ! -f ${PUBLIC_FOLDER}/${JCE_BINARY} ]; then echo "JCE Unlimited Strength binary bundle not found. " >> $SYNOPKG_TEMP_LOGFILE echo "I was expecting the file ${PUBLIC_FOLDER}/${JCE_BINARY} " >> $SYNOPKG_TEMP_LOGFILE echo "Please agree to the Oracle licence at ${JCE_URL}, then download the Unlimited Strength Jurisdiction Policy Files zip file " >> $SYNOPKG_TEMP_LOGFILE echo "and place it in the 'public' shared folder on your NAS. " >> $SYNOPKG_TEMP_LOGFILE exit 1 fi fi cd ${TEMP_FOLDER} for WGET_URL in ${INSTALL_FILES} do WGET_FILENAME="`echo ${WGET_URL} | sed -r "s%^.*/(.*)%\1%"`" [ -f ${TEMP_FOLDER}/${WGET_FILENAME} ] && rm ${TEMP_FOLDER}/${WGET_FILENAME} wget ${WGET_URL} if [[ $? != 0 ]]; then if [ -d ${PUBLIC_FOLDER} ] && [ -f ${PUBLIC_FOLDER}/${WGET_FILENAME} ]; then cp ${PUBLIC_FOLDER}/${WGET_FILENAME} ${TEMP_FOLDER} else echo "There was a problem downloading ${WGET_FILENAME} from the official download link, " >> $SYNOPKG_TEMP_LOGFILE echo "which was \"${WGET_URL}\" " >> $SYNOPKG_TEMP_LOGFILE echo "Alternatively, you may download this file manually and place it in the 'public' shared folder. " >> $SYNOPKG_TEMP_LOGFILE exit 1 fi fi done exit 0 } postinst () { WORKING_DIR=`pwd` #ldd tool is very useful but not included in DSM if [ ! -e /usr/local/bin/ldd ]; then mkdir -p /usr/local/bin cp ${SYNOPKG_PKGDEST}/tools/ldd-${SYNO_CPU_ARCH} /usr/local/bin/ldd fi #extract native binaries if needed if [ -e ${TEMP_FOLDER}/${NATIVE_BINS_FILE} ]; then cd ${SYNOPKG_PKGDEST} #older DSM tar uses different command line switch for xz archives tar xJf ${TEMP_FOLDER}/${NATIVE_BINS_FILE} || tar xaf ${TEMP_FOLDER}/${NATIVE_BINS_FILE} rm ${TEMP_FOLDER}/${NATIVE_BINS_FILE} fi #extract Java (Web browsers love to interfere with .tar.gz files) cd ${PUBLIC_FOLDER} if [ -f ${JAVA_BINARY}.tar.gz ]; then #Firefox seems to be the only browser that leaves it alone tar xzf ${JAVA_BINARY}.tar.gz elif [ -f ${JAVA_BINARY}.gz ]; then #Chrome tar xzf ${JAVA_BINARY}.gz elif [ -f ${JAVA_BINARY}.tar ]; then #Safari tar xf ${JAVA_BINARY}.tar elif [ -f ${JAVA_BINARY}.tar.tar ]; then #Internet Explorer tar xzf ${JAVA_BINARY}.tar.tar fi #install Java if [ "${EXTRACTED_FOLDER}" != "${EXTRACTED_FOLDER/jdk/}" ]; then mv ${EXTRACTED_FOLDER} ${SYNOPKG_PKGDEST} JRE_PATH="`find ${SYNOPKG_PKGDEST}/${EXTRACTED_FOLDER} -name jre`" else mv ${EXTRACTED_FOLDER} ${SYNOPKG_PKGDEST}/jre JRE_PATH="${SYNOPKG_PKGDEST}/jre" fi #install unlimited crypto policy files if requested if [ "${WIZARD_JCE_UL}" == "true" ]; then if [ -e /usr/bin/7z ]; then 7z x ${JCE_BINARY} > /dev/null 2>&1 else unzip ${JCE_BINARY} fi mv ${JCE_FOLDER}/* ${JRE_PATH}/lib/security rmdir ${JCE_FOLDER} fi #change owner of folder tree chown -R root:root ${SYNOPKG_PKGDEST} echo "NOTE - This package does *not* start and stop like other packages. " >> $SYNOPKG_TEMP_LOGFILE echo "Java is correctly installed if you can see the runtime and HotSpot version numbers, " >> $SYNOPKG_TEMP_LOGFILE echo "and locale information in the package Log tab." >> $SYNOPKG_TEMP_LOGFILE exit 0 } preuninst () { exit 0 } postuninst () { #clean up profile mods sed -i "/${COMMENT}/d" /etc/profile sed -i "/${COMMENT}/d" /root/.profile #leave locale support in place on older DSM versions - too risky to delete system binaries exit 0 }
start-stop-status.sh
#!/bin/sh JRE_PATH="`find /var/packages/${SYNOPKG_PKGNAME}/target/ -name jre`" COMMENT="# Synology Java Package" #set the current timezone for Java so that log timestamps are accurate, modern timezone names so DST works SYNO_TZ=`cat /etc/synoinfo.conf | grep timezone | cut -f2 -d'"'` #fix for DST time in DSM 5.2 thanks to MinimServer Syno package author [ -e /usr/share/zoneinfo/Timezone/synotztable.json ] \ && SYNO_TZ=`jq ".${SYNO_TZ} | .nameInTZDB" /usr/share/zoneinfo/Timezone/synotztable.json | sed -e "s/\"//g"` \ || SYNO_TZ=`grep "^${SYNO_TZ}" /usr/share/zoneinfo/Timezone/tzname | sed -e "s/^.*= //"` EnvCheck () #updates to DSM will reset these changes so check them each startup { #/etc/profile should contain 5 lines added by this package tagged with trailing comments COUNT=`grep -c "$COMMENT$" /etc/profile` if [ $COUNT != 5 ]; then #remove any existing mods sed -i "/${COMMENT}/d" /etc/profile #add required environment variables echo "PATH=\$PATH:${JRE_PATH}/bin ${COMMENT}" >> /etc/profile echo "JAVA_HOME=${JRE_PATH} ${COMMENT}" >> /etc/profile echo "CLASSPATH=.:${JRE_PATH}/lib ${COMMENT}" >> /etc/profile echo "LANG=en_US.utf8 ${COMMENT}" >> /etc/profile echo "export CLASSPATH JAVA_HOME LANG PATH ${COMMENT}" >> /etc/profile fi #/root/.profile should contain 3 lines added by this package tagged with trailing comments COUNT=`grep -c "$COMMENT$" /root/.profile` if [ $COUNT != 3 ]; then #remove any existing mods sed -i "/${COMMENT}/d" /root/.profile #add required environment variables echo "PATH=\$PATH:${JRE_PATH}/bin ${COMMENT}" >> /root/.profile echo "TZ='${SYNO_TZ}' ${COMMENT}" >> /root/.profile echo "export PATH TZ ${COMMENT}" >> /root/.profile fi #timezone needs setting each startup in case system value has changed sed -i "s%^TZ=.* ${COMMENT}%TZ='${SYNO_TZ}' ${COMMENT}%" /root/.profile #DSM versions older than 4.3 need locale support adding if [ ! -e /usr/bin/locale ]; then #build missing locale with UTF-8 support (don't think it matters which language) cp ${SYNOPKG_PKGDEST}/bin/* /usr/bin cp -R ${SYNOPKG_PKGDEST}/share/i18n /usr/share if [ ! -d /usr/lib/locale ]; then mkdir /usr/lib/locale fi localedef -c -f UTF-8 -i en_US en_US.utf8 fi #DSM versions up to 5.1 are missing the zoneinfo timezone definitions which causes inaccurate log timestamps #thanks to CoolRaoul here: http://forum.synology.com/enu/viewtopic.php?f=19&t=69232#p310553 #to revert, just remove everything apart from 'Timezone' 'zone.tab' from /usr/share/zoneinfo if [ ! -e /usr/share/zoneinfo/Europe/London ]; then cp -R ${SYNOPKG_PKGDEST}/zoneinfo/* /usr/share/zoneinfo/ fi } case $1 in start) EnvCheck source /etc/profile source /root/.profile #evidence of whether Java can start successfully is written to the package log java -version > ${SYNOPKG_PKGDEST}/output.log 2>&1 echo >> ${SYNOPKG_PKGDEST}/output.log echo System installed locales: >> ${SYNOPKG_PKGDEST}/output.log locale -a >> ${SYNOPKG_PKGDEST}/output.log echo >> ${SYNOPKG_PKGDEST}/output.log echo JAVA_HOME=$JAVA_HOME >> ${SYNOPKG_PKGDEST}/output.log echo TZ=$TZ >> ${SYNOPKG_PKGDEST}/output.log exit 0 ;; stop) exit 0 ;; status) source /etc/profile source /root/.profile if [ -e "${JAVA_HOME}/bin/java" ]; then exit 0 else exit 1 fi ;; log) echo "${SYNOPKG_PKGDEST}/output.log" exit 0 ;; esac
install_uifile
[ { "step_title": "Java Runtime Environment Selection", "items": [ { "type": "singleselect", "desc": "Please select the Java version to install:", "subitems": [ { "key": "WIZARD_JRE_EE", "desc": "Java SE Embedded 8 (smaller memory footprint, 32bit)", "defaultValue": true }, { "key": "WIZARD_JRE_SE", "desc": "Java SE 8 (64bit)", "defaultValue": false } ] } ] }, { "step_title": "Java Cryptography Strength Selection", "items": [ { "type": "singleselect", "desc": "Please select Java Cryptographic Extension policy:", "subitems": [ { "key": "WIZARD_JCE_STD", "desc": "Default Strong JCE policy - limited to AES-128 encryption", "defaultValue": true }, { "key": "WIZARD_JCE_UL", "desc": "Unlimited Strength JCE policy - not permitted in some jurisdictions, see Oracle documentation", "defaultValue": false } ] } ] } ]
Changelog:
- 0050 17/Apr/19 – Updated to Java 8u211, added support for DS119j
- 0049 11/Apr/19 – Updated to Java 8u201, fixed issue where x86_64 CPUs would ignore user selection and always install 64bit Java SE
- 0048 22/Aug/18 – Updated to Java 8u181, added option to select 64bit full Java SE for x86_64 CPUs
- 0047 14/May/18 – Updated to Java 8u171
- 0046 20/Feb/18 – Updated to Java 8u161, experimental aarch64 support
- 0045 30/Oct/17 – Updated to Java 8u151, added support for new CPUs in x17 and x18 models
- 0044 02/Aug/17 – Updated to Java 8u144
- 0043 21/Jan/17 – Updated to Java 8u121
- 0042 07/Jan/17 – Updated to Java 8u111, fixed Armada 370/XP systems running DSM 6.0 which had switched from soft to hard float ABI
- 0041 25/Jul/16 – Added support for unlimited strength cryptography (default is strong)
- 0040 20/Jul/16 – Updated to Java 8u101
- 0039 26/Apr/16 – Updated to Java 8u91
- 0038 24/Mar/16 – Updated to Java 8u77
- 0037 07/Feb/16 – Updated to Java 8u73
- 0036 26/Jan/16 – Updated to Java 8u71
- 0035 14/Dec/15 – Updated to Java 8u65, added support for models DS716+ and DS216play
- 0034 19/Aug/15 – Fixed timezone DST issue with DSM 5.2, added support for DS215+
- 0033 07/Aug/15 – Updated to Java 8u51, PowerPC build remains at 8u6
- 0032 13/Jul/15 – Fixed timezone issue with DSM 5.2, updated main blog post documentation
- 0031 25/Jan/15 – Fixed issue with version 0030 for systems with more than one volume
- 0030 21/Jan/15 – Improved temp folder detection, updated to Java 7u75 and Java 8u33 (Oracle did not publish a version for PowerPC)
- 0029 25/Dec/14 – DSM timezone zone.tab file is no longer overwritten, which had been prompting a malware alert in DSM 5.1 Security Advisor
- 0028 20/Oct/14 – Updated to Java 7u71, added missing zoneinfo timezone definitions to fix inaccurate timestamps for non-GMT timezones (checked every startup), switched native binary archives from .tgz to .tar.xz format to reduce size
- 0027 18/Oct/14 – Updated Java 8 to 8u6, added support for Mindspeed Comcerto 2000 CPU in DS414j for Java 7 and Java 8
- 0026 24/Jun/14 – DSM updates will no longer break Java
- 0025 31/May/14 – Updated to Java 7u60
- 0024 31/May/14 – Updated to Java 7u55
- 0023 27/May/14 – Added Java 8 support
- 0022 30/Jan/14 – Updated to Java 7u51
- 0021 15/Nov/13 – Locale support is no longer downloaded and added to DSM 4.3 or newer since it’s already present
- 0020 30/Oct/13 – 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 17/Oct/13 – Updated to Java 7u45
- 0018 11/Oct/13 – Updated to Java 7u40, and JDK8 Early Access b106
- 0017 05/Jun/13 – 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 21/May/13 – Added Armada370 CPU support (DS213j)
- 0015 18/Apr/13 – Updated to Java 7u21, Java 6 Embedded seems to be no longer maintained by Oracle
- 0014 13/Feb/13 – Fixed metadata for DSM 4.2 Package Center
- 013 13/Dec/12 – Updated to Java 6u38 and Java 7u10
- 012 10/Dec/12 – 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 23/Aug/11 – 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!)
The latest version of Java 7 is 7u10. Can the package be re-written to validate against this, rather than 7u6?
Done!
Java has been updated again it seems. It’s looking for the file
ejre-7u10-fcs-b18-linux-i586-headless-13_nov_2012.tar.gz but i can only download
ejre-7u10-fcs-b18-linux-i586-headless-28_nov_2012.tar.gz.
I tried renaming but to no avail…
Check again at http://tinyurl.com/javaembed
The 28th Nov file is Java 7. The 13th Nov file is Java 6. I just double checked the package script and it’s still correct. Intel Synology products can only run Java 6 so you are trying to use the wrong file.
Hello, since it’s no longer possible to download the required packages from Orcale (just tried, and it’s not in the archives as well), could you please upload the correct packages to a site?
Java packages updated to use latest versions from Oracle.
Cool, thanks! I was able to install it with some renaming trick, but I’m gonna make a fresh install, just to make sure :)
That wouldn’t have worked because there’s a folder inside the archive which needs selecting by name – and that changes with each release.
Is there a plan to update to the latest Java versions – Java 6u38 and Java 7u10?
I am unable to install as I recieve an error message displaying the full expected filename.
These older java versions – Java 6u34 and Java 7u6 – appear to no longer available to download from the oracle website or archive.
Thanks,
Suzannah
Hi Patters,
I’ve been able to setup Crashplan and Java 7 embedded on my 411j. Which was working great. Now I’ve tried to upgrade Java 7, and therefore the file “ejre-7u6-fcs-b24-linux-arm-sflt-headless-10_aug_2012.tar.gz” is needed. I’ve searched everywhere, but no luck, the file isn’t available from the Oracle download section anymore.
Because I allready tried to upgrade, the current Java 7 installation isn’t working anymore….
Any idea to get things working again?
Thx,
Rogier
I’ve searched everywhere also and the required Java packages are impossible to get now. Oracle only makes certain versions available in the Java Archive download page and unfortunately they did not do this for the ones required by this Synology package.
Oracle did choose to make 7u4 and 6u32 available in the Archive page for the long haul. So maybe just standardize on those for this Synology package rather than latest Java versions to avoid having to keep up with each Oracle java version bump?
In any case, really hoping you can update your Synology package so it can still be used or someone can post one of the supported Oracle packages somewhere for download!
Thanks!
I updated them earlier today btw!
Perfect, many thanks. Installed and running fine on a DS213 now I’ll put on my DS713+ next. I’ll be clicking that Paypal Donate button.
Hi Patters! I still can´t install java on my DS212j. After Upgrading to dsm 4.1 I can´t install crashplan because Java is not working. The java install seems right but crashplan installer says it´s not. In the java log I can read this: “/var/packages/java7/scripts/postins: line 28:java: not found.” Can you please help me with this?
Hi again. Is there anyone else that know anything about these problems I described above? I would really like to make crashplan work again soon.
Hello, i have install the new version of synology on my DS 210j, i have re-install the java package and crashplan. But i can’t connect to crashplan with the tunnel “ssh -L 4200:localhost:4243 admin@xxx.xxx.x.xx”
i have this error
channel 3: open failed: administratively prohibited: open failed
any idea?
I’m trying to install java but I cant see the install-package via package source when I use http://packages.pcloadletter.co.uk.
Is there something wrong. Why can’t I see the Java SE Embeded as a package?
Does anyone have the spk-file for “java se for embedded 7”?
I’m having the same problem on my DS210+, the install package is not there. Does this mean the java package cannot be installed on a DS210, or is there another problem?
That model’s CPU is not supported, as stated.
Patters, a solution for older CPUs may be en route. This a copy/paste of Syno’s reply. I quote your post (with link of course) stating the Glibc problem. Answer I got a couple hours ago was:
“Hi Thibault,
Thanks for your waiting.
According to our engineer, our engineer has a plan to upgrade glibc in the middle of this year. If everything is like what’s expected, you could see the update in the middle of this year’s release.
Hope this helps.
Best Regards,
Adair Hsu
“
Guess this is the reason why it would not run on a DS410 eventhoug I don’t understand why some Freescale CPUs are supportede and others aren’t
Because the underlying Linux distribution on those older ones is different. It’s a software issue, not a hardware one.
Hi
I’ve just bought a Synoogy NAS and have heard about Serviio. Where can i obtain a download of Java SE for Embedded 7 so that i can use it on my NAS please?
Thanks for your help!
Regards, Steven
It’s all explained on this page. If you’re uncertain which file you need to download from Oracle – try installing my package without it and you’ll be prompted.
Hi patters
I’ve looked on this page and can’t find a link – I’ve gone to Oracle’s site and it is no longer available – would you be able to send me a link please?
Thanks
Regards, Steven
In step 2 of the instructions there is a hyperlink.
Hi Patters,
just tried to install Java 7_10 on my DS 413, but it looks like the script is balking.
Even though I’ve put both files
ejre-7u10-fcs-b18-linux-ppc-e500v2-headless-28_nov_2012.tar.gz
java-native-ppc.tgz
into /volume1/public, I get the error message that java-native-ppc.tgz could not be downloaded.
If you need any further information, feel free to contact me via PM.
TIA
Matt
Exactly the same problem as I have with my DS1812+ (Intel CPU), so I use Java 6.
Same problem with Java 6, unfortunately.
@Patters, do you have an idea what causes this problem?
The 4.2beta does not support Java on the DS413, so I’m out of luck with Crashplan, which is a shame.
Hi Patters,
did some digging, and this is what I found out:
In java1.7.0_21-merged-0015.spk is a file called installer.sh, which looks like the installer (doh!).
In line 79 and 80 a variable named ${DOWNLOAD_FILE} is used but never assigned.
I’m not much into shell programming, but could this be the reason why Java 7 won’t install on my DS413?
Well spotted – that bug has crept into most of my installer scripts so I’ll fix those in the next update. However, your NAS ought to be able to download the relevant files regardless of that problem. That bit of logic is only tried if the wget command fails. Can you run this from an SSH session on the NAS:
wget http://packages.pcloadletter.co.uk/downloads/java-native-ppc.tgz
If I remember the script correctly, the unassigned variable leads causes the script to not find the downloaded files, after which it reports an error message and fails.
Downloading the file from your server via wget works fine.
Hi Patters,
do you have a date for the next version? If you need someone to give the update a try, feel free to contact me!
Hi patters.
Today released beta 4.2 comes with Java Manager which helps to download and install Oracle Java package (pretty much the very same way as your package)the only difference is target location for Java installation which is /var/packages/JavaManager/target/Java/jre/lib.
Are you p0lanning to use officially suuported Java installation and is there any chance you could update Serviio package and Minecraft pretty soon?
Actually Java Manager before installation has discovered of Java installation from your package, so maybe they are fully compatible?
I will test and give you a shout.
Is there any chace you could send Java based aplication to Synology to include them in official 3rd party repository?
Kind regards
Hi again.
Just uninstalled your Java package, installed official Java Manager and conducted Java installation using that software, rebooted my DS712+ and Serviio apparently works fine with new Java.
The only catch is for now Synology package supports only version 6 (I believe because of problems with 7 on Atom based boxes).
Hi, could you tell me how remove the java package? I ‘ve already set JAVA_HOME= ’empty’ and removed JDK directory but i’ve still the same error message while i’m trying to install java manager package…
Help!
Did you check while you were running as the root user? Package Center runs as root.
Thanks a lot for the package. After the installation is it possible to delete the ‘public’ folder or is it required?
Many of my other packages require it and if Java gets updated you’ll need to put it back so, I’d probably recommend leaving it.
Have you had the chance to look at the new java package integrated with DSM 4.2? Will this still be needed with an official Java package maintained by Synology?
And in case your java package is not needed, would you mind releasing a package that installs UTF-8 support? That is greatly needed, at least for me, but I think for many other users…:)
Pingback: Ryan, Debi, and Toren Cragun's Blog » Linuxmint or Ubuntu: Crashplan backup using headless Synology NAS
Excuse me Sir, I can’t find the package of java 6 or 7. I can just see the package of Minecraft, Bukkit and OpenRemote. Did i did something wrong? why I can’t find it?
Sorry Sir it’s me again, i did known that my NAS is using PowerQUICC PowerPC processors, So have there any method to use Java?
Hi, there is a method using pre-made packages available here:
http://chreggy.fr/thegeek/2012/01/10/crashplan-sur-un-synology-powerpc-ds109/
You will need to translate the page from French.
Sorry, it my final question, I want to know where I can find the old version?
I just updated the Java/CrashPlan packages (thanks!), but now CrashPlan on the Synology thinks its a different destination than it was before the backup, so when I look at my CrashPlan destinations from my laptop, I see the Synology unit listed twice, the “real” one that contains my backup but is offline, and a second online one that is available for a new backup. Is there an easy way to tell CrashPlan on the Synology to be its old self? Thanks!
It seems that the latest CrashPlan package has created /var/services/homes/crashplan, ignoring /volume1/crashplan, the latter of which has all my backups. Should I perhaps just symlink one to the other?
/var/services/homes/crashplan is where the app settings are stored (plus sync status, block tracking). /volume1/crashplan is where friends’ backup data is stored. No changes to that for a long time.
I see, thanks. Have you seen this before, where CrashPlan doesn’t notice that it had been installed before and sets itself up as a new computer? I have terabytes of backup from multiple places that I’d prefer not to redo from scratch :-)
I see now that the old configuration data lies in “/volume1/@appstore/crashplan_data_mig”, while the new/unneeded data lies in “/volume1/@appstore/CrashPlan”. It seems that I should be able to rsync the former over the latter… does that seem reasonable?
Thanks!
To followup on my own question, I did rsync the conf and .crashplan directories over from “crashplan_data_mig” (whatever that is… data migration?), started the service, and it worked. It took several hours to do a deep compact and sync data, but then was caught up.
I spent several hours online trying to find the best online backup for a synology DS213+ after having some doubtful experience testing the Synology client for Amazon Glacier and I think I found it here.
Hi Everybody,
I wanted to update my susbsonic to 4.7 and figured I might as well update my DSM and java as well. I got myself in some trouble though.
After updating to DSM 4.1-2668 on mu DS211j I’m not able to install Java and Subsonic.
After updating DSM, I tried to do a fresh java install. Although the links are correct in the install files Package Center says that there was a problem downloading the java-native-armv5tel.tgz file.
Manually installing the pacakges doesn’t work either. Placing all the files in my public share folder doesn’t solve the problem. When i place the wrong java install in my public folder package center does mention that it was expecting a other file. Placing the right file in the public folder makes this message dissapear, but then there is the downloading problem. So it seems to find my public folder, but it doesn’t install the files that are in there.
Does anyone knows what’s wrong? Any help is appreciated!
After using subsonic for years now, I miss it everyday. I’m not looking forward to installing it manually through ssh again.
Hi! Im excited by finding this solution. Thanks for all the work.
I have an issue when entering http://packages.pcloadletter.co.uk into dsm 3.2 on my synology ds211+. It looks for the location, then I get, ‘invalid location’. I can’t find anyone else who seems to have experienced this. Any advice?
James
If you log into your syno via SSH, can you ping packages.pcloadletter.co.uk ?
thanks for the repIy
I can ping it from my MacBook Pro
http://imageshack.us/photo/my-images/713/screenshot20130222at927.png/
when I log into my syno via ssh and ping i get bad address (it’s the first time I have ever done this)
http://imageshack.us/photo/my-images/853/screenshot20130222at929.png/
I just upgraded the dsm to v4.0 to see if that helped and it didn’t.
I’m still reading as much as I can to improve my knowledge and I’m sure it’s a setting my end. I’ve followed all your instructions above which I think are pretty clear. Hope to get there soon!
Try explicitly adding a DNS server to the network settings in DSM. I seem to recall mine didn’t work properly until I did that. If you don’t know your ISP ones, just add 8.8.8.8 (Google DNS server). Should fix your issue hopefully.
ok, it was a dns thing, i changed my dns to 8.8.8.8 in the syno and now the packages works. Thanks!
Having problems getting this to work, I’ve tried java 7 first, then tried java 6 – Here’s what I’ve done so far
Platform: DS209
DSM Version 4.0-2228
Created public folder, set permissions,
Downloaded: ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.gz
and also tried
ejre-7u10-fcs-b18-linux-arm-sflt-headless-28_nov_2012.gz
Placed in public folder, updated the package sources, ran the installer, but both times I get:
‘The Operation Failed. Please log into DSM again and retry.”
It seems your script can handle the .gz extension, and I’ve tested running the installer without anything in public and it threw an error, so it seems like it’s working. Not sure what the problem is. I’ve also downloaded java-native-armv5tel.tgz and placed in public too with no effect.
Any thoughts?
Did you try downloading those archives using a different web browser, say Firefox?
I’ve got some trouble to setup Java on my DS411. After un update of DSM (4.0 to 4.2), I also remove my old Java 1.6, in order to install an up-to-date version.
Removing Java was OK, but installing the brand new version is KO (neither java6 nor java7). Here is what I’ve done
– Downloaded the appropriate java files and saved them in my public folder ejre-1_6_0_38-fcs-b05-linux-arm-sflt-eabi-headless-13_nov_2012.tar.gz for Java6 and ejre-7u10-fcs-b18-linux-arm-sflt-headless-28_nov_2012.tar.gz for Java7)
– Try to launch the appropriate package (6 or 7). Downloading the package -> OK. Confirm settings screen -> OK. But just after this screen, a message saying “Java SE for Embedding 7 – Failed to install the package” (same for Java 6).
In /volume1/@tmp/@synopackage, I can see the new folder java7, which contains the single file @SYNOPKG_DOWNLOAD_java7, confirming the package download was OK. But I see in the INFO file of the package that the arch attribute is not define for 88f6282, the architecture of my DS411. I changed this and recreate a package to install manually, but still the same problem, I’m a little bit lost now…
Having trouble install. The default package on Oracle still is the ejre-7u21-fcs-b11-linux-ppc-e500v2-headless-04_apr_2013.gz package. Do I need to wait for an upgrade of the Synology package before I can install java 7 ?
BTW, this is on a 412 running DSM 4.2
I can’t download the file ejre-7u10-fcs-b18-linux-arm-sflt-headless-28_nov_2012.tar.gz from Oracle. the have a newer file and with the newer file i can’t install Java on the nas
I have released a new version of the Java 7 package since Oracle have updated it. It looks like Java 6 Embedded is no longer being actively maintained. Please can someone try this on Intel and see if it works (after installing, try “java -version” in an SSH session).
http://packages.pcloadletter.co.uk/downloads/java1.7.0_21-merged-0015.spk
With “ejre-7u21-fcs-b11-linux-arm-sflt-headless-04_apr_2013.gz” for the DS 212+ everything is fine. Thanks for the update!
After upgrading your Java 7 package on my DS413, the log no longer shows the version numbers but the following error message
/var/packages/java7/scripts/postinst: line 28: java: not jound
I can no longer run your Crashplan package because of this.
Please help!!
I think that the Java download file must have been corrupt. I downloaded it again and everything installed correctly.
http://www.oracle.com/technetwork/java/embedded/downloads/javase/default-1934076.html maybe this will get you v6
I have installed the correct script through the Java SE package
I have installed the crashplan package
I have run the SSH connect to route 4200 to 4243
I have added the following to the UI file servicePort=4200
When I run the app the terminal window shows the following error
channel 3: open failed: administratively prohibited: open failed
I run a 412+
I am trying to run the client on the Mac
Given the continuing security issues that Java has been experiencing, I wanted to ask what the procedure is for updating to new Java versions is on when using this package on a Synology NAS? Will I need to uninstall and then reinstall it, or is there a procedure for doing this by putting a new Java version in the /public share, or even better is embedded Java able to automatically check for updates?
Thanks for providing this package by the way! It made installing CrashPlan a few custom Java apps of my own a breeze! I wonder though; instead of trying to support specific Java packages would it not be easier to have this installer just check using the naming convention of the files? I think most users can handle finding the right download if the installer just tells them the architecture they need the release to be targeted for, so trying to give a specific download name is probably more confusing overall.
When I first made the package I wasn’t particularly familiar with Linux shell scripting (coming from Windows) so I kept it simple. I could possibly automate it a bit further in future, but since Oracle keep changing their website, and since there are a lot of people who don’t follow the instructions correctly I think this would result in more confusion overall. It’s useful that the error messages are so explicit about precisely what needs to be downloaded.
When a new version is released by Oracle, people tend to report difficulty in finding the correct file on these comments here, and I update the package. I publish this updated package version on my package repo, and your Synology will automatically report that an update is available.
Is there a Java SE for Embedded 7 for Synology Intel version now available? Crashplan no longer works for me as they now require version 7 of Java.
Hello,
I am having the same problem as someone has had (as per the reading of the complete 500 comments…)
I have downloaded from Oracle site and put the proper tar.gz file in the /public/ folder on hte synology.
I install and the process finishes successfully (from the “gui” point of view).
But then if I check the logs (output.log or log in the gui of package manager) I have the message:
/var/packages/java7/scripts/postinst/: line 28: java : not found
and indeed if I go to the java home foldet 7volume1/@appstore/java/
there’s no jre folder and no binary at all…
Also installng applications that need java se leads to the message “no java installed”
Creating a directory jre and untarring there the content of the tar.gz would solve?
I am on a DS212
the binary put in /public is:
ejre-7u21-fcs-b11-linux-arm-sflt-headless-04_apr_2013.tar.gz
Thank You for your help
It seems I have found the cause of the problem.
I do not understand how but the ejre file is ok on the PC and gets corrupted in the transfer to the syno…
I mean I can uncompress it on the PC or iPad. When transferred tar is saying the file is nogzip
And a final successful update hoping it avoids headaches to others.
The problem was linked to the transfer of the file to the syno.
Somehow the format of the file was altered in this step.
Please note that the file was not corrupted: 7z from command line in shell was decompressing it, not tar.
I was transferring from iPad to syno though dsfile.
Then I tried to put it in the synobox sync directory and… Magic tar was working on the transferred file…
Hey, what about the new DS213J, Kirwood Armada 370 CPU, ARMv7 !?
Is it possible to make it work?
It should be possible, yes. I don’t have time right now, but I ought to be able to build something for you to test soon. Do you own a DS213j yet or are you just considering it?
sounds nice! i own it already. no stress!
THX!!!
I have a 213j and am very keen to get this installed in order to install the Crashplan package.
Can you run
uname -m
and post the output please? I have a Java package ready for testing, but I need this detail first.The output is “armv71”.
Thanks. Are you absolutely positive that’s a one and not an L? Did you copy and paste it?
I didn’t copy & paste. This time I did and it’s “~ # uname -m
armv7l
~ # “. That’s a ‘l” (small ‘L’) not a 1. Sorry, you make the package and I can’t even copy the output of a command righ ;-(
Thanks. Try installing this:
http://packages.pcloadletter.co.uk/downloads/java1.7.0_21-merged-0016.spk
You’ll need to follow the usual instructions on this page to get the file from oracle.com and so on.
Once that’s installed, can you run
java -version
and paste the result back here.If you have a moment, I’d appreciate it if you could test my build of FFmpeg for the DS213j too
https://pcloadletter.co.uk/2012/01/25/serviio-syno-package/ (see my last comment)
If that works ok then I’m very close to releasing Serviio for this model of NAS. Since it has an FPU this NAS could well end up being better than Synology’s other non-Intel products. Also, I have selected the new ARMv7-only Server Compiler JVM which should be quite a lot (40%) faster than the typcial Java 7 runtime. See here:
http://blogs.arm.com/software-enablement/660-oracles-java-se-server-compiler-now-on-arm/
Once Java’s working OpenRemote and MineCraft/CraftBukkit will just work since they have no native binary dependencies.
After that I’ll look into CrashPlan, and Bliss.
I installed the first package, I presume that I either need the path. I don’t know what path to use.
I worked it out after putting in the last comment…
/var/packages/java7/scripts # /volume1/@appstore/java7/jre/bin/java -version
java version “1.7.0_21”
Java(TM) SE Embedded Runtime Environment (build 1.7.0_21-b11, headless)
Java HotSpot(TM) Embedded Server VM (build 23.21-b01, mixed mode)
/var/packages/java7/scripts #
Great, it’s working then. Can you check locale support is ok? Run “locale -a”. If it lists some locales then all is good.
Any joy with FFmpeg?
/var/packages/java7/scripts # locale -a
C
POSIX
/var/packages/java7/scripts #
I haven’t started on FFmpeg, I’ll try to install it now.
Cool. Can you log out from your SSH session and start a new one, then run locale -a again? There should be UTF-8 listed, from memory.
For FFmpeg, copy the .tgz download to a temporary folder then run:
tar xvzf ffmpeg-armv7l.tgz
to extract it. It will unpack a bunch of libs, hence using the subfolder.
Logged out and back on and ran the command.
/var/packages/java7/scripts # locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
/var/packages/java7/scripts #
Locale support should be fixed now. I had made a mistake when extracting the stuff required for Linux locale support from the Armada 370 toolchain. If you remove the Java package from Package Center and re-install using that same download link it should work. Can you confirm it’s ok, then I’ll publish on the package repo.
Here’s with the new package…
~ # /volume1/@appstore/java7/jre/bin/java -version
java version “1.7.0_21”
Java(TM) SE Embedded Runtime Environment (build 1.7.0_21-b11, headless)
Java HotSpot(TM) Embedded Server VM (build 23.21-b01, mixed mode)
~ # locale -a
C
POSIX
en_US.utf8
~ #
Is this what you’d expect?
Yep. Time to publish!
Which Java Embedded to I need for a DS-213 (Marvell Kirkwood mv6282)? I see that there are 4 ARM installations available – is mine the one for ARM6 (due to the mv6xxxx)?
You want the ARMv5 one – it’s in that CPU family (the mv6xxx number is unrelated – pretty confusing!). If you try to install the package without the file downloaded and the error message will tell you the exact filename and version it’s expecting.
THX! Works. (DS213j)
I installed Subsonic. But Subsonic/Java somehow crash while scanning files.
Perhaps i will try Serviio soon ;D
Hi, i’ve installed yesterday this java version (ARMv5 Linux – Headless EABI, SoftFP ABI, Little Endian2; ejre-7u21-fcs-b11-linux-arm-sflt-headless-04_apr_2013) on a DS411. Everything worked fine. Today an update notification about the java package was displayed. After trying to update it, Java isn’t working anymore. Nor can it be uninstalled or reinstalled. Failure message: “Failed to install package”… Any ideas how to fix this…
Apologies, I’ll fix very shortly – I must have made a mistake with the latest version. I’m on the way home at the moment…
That’s fixed now. I had forgotten that I had changed some other parts of the script to allow for the installation of the Java JDK 8 preview (originally intended for Raspberry Pi, but which should run on Armada 370), and unfortunately that had introduced a syntax error. Sorry!
thanks for your fast support. works proper again
Hi patters,
First, thanks big time for your efforts! Because of your java and crashplan packages I have been running CrashPlan perfectly on my Syno DS1512+ for many months. Unfortunately I have just run into a problem though. I updated DSM to 4.2 and then CrashPlan was crashing ever couple minutes. I remembered that you had mentioned that the java pkg would have to be reinstalled after a DSM update. So I uninstalled and and now I get the following message on install “This package is not supported on the platform of DiskStation.”
The DS1512+ has an Intel Atom D2700 processor.
Any ideas on what I can do to get your java pkg installed again?
Thanks again!
I have exactly the same problem. After an update, Minecraft as well as the Java is gone and it can not be installed again due this error message: “This package is not supported on the platform of diskstation”.
Really sorry about that. Again this is a bug that crept in when I added Early Access JDK 8 support in. Due to the nature of the fault, this didn’t actually affect ARMv5 Synology’s (like my own Syno). Should be fixed now.
Perfect again. Thanks for such fast support! A few beers coming your way via paypal :-)
Inded it works now again.
Thank you very much for your work!
First of all: Thanks a lot for your great work.
After a Firmwareupgrade of my DS412+ Intel Atom D2700 Dualcore (2C/4T) the Java isn’t running anymore.
I reinstalled it, the Java seems to be running correct, but the Log says me: “/var/packages/java6/scripts/postinst: line 28: java: not found”
And after that, Crashplan can not installed anymore. It says: “Java ist not installed oder not properly configured.The Java binary could not be located”
Hi,
Have exactly the same problem after updating dsm on my ds212j
Did you find a solution?
Have you any idea, what would it could be?
DSM Tells me that “Power Architecture Linux – Headless – e500v2 core” is wrong file. I need to use “x86 Linux Small Footprint – Headless” Instead. In your text you have specified e500v2 to be used and not the other one.
Synology DS213 – Invalid File Format – When I try and install the Armv5 version (ejre-7u21-fcs-b11-linux-arm-sflt-headless-04_apr_2013.tar.gz) using the manual install in the Package Centre I get an ‘Invalid File Format’ error. I have followed your instructions and also downloaded the file using different browsers. Any ideas?
Thanks.
I figured it out in the end – I was trying to install it incorrectly.
I was trying to manually install the Java tar.gz archive directly instead of the version referenced through your package repository.
For anyone having similar problems, here’s what I did:
After I had downloaded the Java file to my ‘public’ folder and entered the package repository URL (see PCloadletter guide, linked in my previous post) in Settings-Package Sources, what I needed to do was look in the ‘Community’ section of the Package Centre for the listed Java install. Click this to install.
I’ve amended that bit of the instructions to signpost that a bit more.
Hi,
I’m trying to install Java on a DS209+II (ppc853x) with this Java version ejre-7u21-fcs-b11-linux-ppc-e500v2-headless-04_apr_2013.tar.gz.
However I’m not able to download any of your Java packages, as it seems ppc853x is not supported by your packages, and hence they’re not visible in package center.
Would it be at all possible for you to make a version available for this architecture?
Kind regards,
Michael
I’m afraid not. It’s complicated since those systems have an older glibc than Java requires. There is a workaround involving a Debian Linux chroot, but I can’t test this, so I can’t support these models. Have a look here though – should be what you need:
http://chreggy.fr/thegeek/2012/01/10/crashplan-sur-un-synology-powerpc-ds109/
Hi,
Thanks a lot. I’ll see if I can get it working with the recipe in your link.
Kind regards,
Michael
Tried to install the JDK 1.8 preview two times but it doesn’t work on my DS213j. Log of the installed package says “java not found”. Any ideas?
Sorry, forgot to mention that I got a DS213j. I want to get a Minecraft server running (Spigot, because I used it before an my Raspberry Pi and it delivered a better performance than Bukkit). However I tried a few things today and none of them really worked:
-I unpacked the JDK 1.8 preview manually but I still can’t use it because linux “can’t find it”. Leads me to believe that the preview is not compatible with armada 370.
-Installed your Java 7 package and Spigot now starts. However as soon as someone logs in it crashes.
-Downloaded the Java 7 server client and unpacked it. But it crashes right after starting it.
My conclusion is that there is no stable Java for DS213j yet. Can someone confirm these problems?
From the testing some users did on Armada 370, the Java 7 client JVM was ok, but using the Server one would result in frequent crashes for apps that were otherwise stable (Serviio, CrashPlan).
Did some more testing yesterday. I both tried your Java 6 package and a manual install. However everything remains the same. Then I tried your Craftbukkit package (before I was using my own Spigot server transferred from my RPi only). When Craftbukkit starts CPU Usage goes up to 100%. I know that it has to generate the spawn area. This process took roughly 20min on my RPi. But even 12 hours later CPU usage is at 100% and if I try to connect with a 1.5.2 client only error I get is “end of stream”.
Am I doing something wrong? I got the latest firmware and I got my 213j not even a week ago.
Hi, I’m trying to use ejre-7u21-fcs-b11-linux-i586-headless-04_apr_2013.gz (just downloaded today) on SYNO DS-1511+ (Intel Atom D525 Dualcore (2C/4T) 1.8GHz x86 Processor).
So I think I got the good one (maybe I’m wrong …)
But your package only accepts JAVA SE6 …
Are you able to change it to being able to use the latest JAVA SE7 ?
Thanks in advance
It doesn’t work on Intel Synologys I’m afraid, hence Java6 only.
Hi,
I need your help from France :-))
I have a DS213j, with dsm4.2
I’ve install surveillance station, but when i want to open Video, pop up said : “please install java…”
I googlle it and found this web site.
I install java 7 package –> OK, but same problem with surveillance station : “please install java…”
uninstall java 7, and install java 6 –> OK for java
DS213> ./java -version
java version “1.6.0_38”
Java SE Embedded Runtime Environment (build 1.6.0_38-b05, headless)
Java HotSpot(TM) Embedded Client VM (build 20.13-b02, mixed mode)
DS213>
But always same problem with surveillance station : “please install java…”
reboot ds213j -> Idem
Have you got an idea ?
thanks for your help and your job !!
seb
OK no problem……
“please install java…” mean install java on the computer (already install !) not on the NAS.
Sorry
Seb
Could you try if Java 8 preview works on your DS213j? Because it doesn’t on mine:
“java not found”.
Hello,
I have a DS713+. I want to instal Minecraft server, but getting the folowing Java problem:
JAVA_HOME is not defined ?
I have installed 1.6.0_38
I’ve got a Intel Atom processor
How can I solve this issue?