Today i’ve installed java on my NAS Device (a D-Link DNS-345) what i personally see as a highlight as i can now use software that was not available to me before. Oracle provides a “Java SE Embedded”, which is suitable for NAS devices thanks to its reduced memory footprint. For the following tutorial you need to have fun_plug installed!
Download
Go to the Oracle Page and choose “ARMv5 Linux – Headless”. Now you will be redirected to a survey, where you have to enter Name, Prename, Mail, Organization and Role. Then you will receive the download-Link via E-Mail. Click on this Link and accept the license agreement.

Copy the downloaded file (in my case its name was ejre-7u6-fcs-b24-linux-arm-sflt-headless-10_aug_2012.tar.gz, but that is subject to change) to the NAS. I’ve copied it to /mnt/HD/HD_a2/, please adapt the following commands if you copy it elsewhere.
Installation
First create a directory:
mkdir -p /ffp/opt/java
Then unpack the archive from before:
cd /ffp/opt/java tar xvzf /mnt/HD/HD_a2/ejre-7u6-fcs-b24-linux-arm-sflt-headless-10_aug_2012.tar.gz
Now create a link to the unpacked directory (“ejre1.7.0_06″):
ln -s ejre1.7.0_06 jre
Now put it permanently into the environment variables:
echo "export PATH=/ffp/opt/java/jre/bin:\$PATH" >> /ffp/etc/profile.d/java.sh chmod a+x /ffp/etc/profile.d/java.sh
Logout and Login into the NAS.
Installation-test
Check if it works:
java -versionThis should display something like this:
java version "1.7.0_06" Java(TM) SE Embedded Runtime Environment (build 1.7.0_06-b24, headless) Java HotSpot(TM) Embedded Client VM (build 23.2-b09, mixed mode)
I’ve tried running logstash (http://www.logstash.net/) but CPU seems hogged at 99%
Tried both 1.6 and 1.7
What experience you have with running other kind of software?
Other software runs fine
Maybe you should test with other software?
Bei mir klappt die Installation bis zum Punkt java -version.
Da erhalte ich stets die Fehlermeldung: no such file or directory
Bitte um Hilfe.
Did you try to logout and login?
Best Regards,
Uli
Same here. I tried to install java on my DNS-325…
login as: root
root@192.168.2.186‘s password:
root@DNS-325:~# java -version
-sh: java: command not found
Using username “root”.
root@192.168.123.92‘s password:
Last login: Mon Sep 3 13:02:29 2012 from 192.168.123.100
root@DNS-323:~# java -version
-sh: /ffp/opt/java/jre/bin/java: No such file or directory
root@DNS-323:~#
Das habe ich nach einem neuerlichen Login eingegeben. Wenn ich mit cd in das Java-Verzeichnis gehe und Java direkt starte, kommt interessanterweise auch dieselbe Fehlermeldung.
Übrigens – folgende Datei habe ich runtergeladen und installiert:
ejre-7u6-fcs-b24-linux-arm-sflt-headless-10_aug_2012.tar.gz
Hi, ich habe das gleiche Problem, wie Johannes. Trotz neuerlichem Login kein Erfolg: No such file or directory. Gibt es da einen Kniff?
Thank you very much for this manual.
Now I can use Subsonic (standalone) on my ZyXEL NSA325.
Stefan can you tell me how to use subsonic on zyxelnsa
thanks
Thanks for this and your other tutorials they are a great resource (though finding issues using PHP on 0.7 which im currently trying to correct (going to try and compile 5.4.10))
Anyone accomplish to install Java on the DNS-323 ?
Thanks
Hello, anyone can help me installing Serviio on s DNS-320? Thanks
when i put this in
cd /ffp/opt/java
tar xfvz /mnt/HD/HD_a2/ejre-7u6-fcs-b24-linux-arm-sflt-headless-10_aug_2012.tar.gz
i get this
tar: old option ‘f’ requires an argument.
try ‘tar –help’ or ‘tar –usage’ for more information
can someone help please i am a novice noob
use tar xvzf NOT xfvz. The last character must be f because hereafter you specify the archive filename
thanks wilco
Where should I copy the java tar.gz file in my nsa?
How do I know what to type for the directory (instead of ‘/mnt/HD/HD_a2/’) of the tar.gz file?
(I use NSA 310)
I had a pro blem with FFP 0.7. I need to used this link commnand:
ln -s /ffp/opt/java/ejre1.7.0_10 /ffp/opt/java/jre
For those people of you, who just copied (like i did
) :
When creating the link you have to use the correct version number…since this manual uses “ln -s ejre1.7.0_06 jre” and you might have downloaded a newer version (like i did and i did not adhere that at first), you have to use “ln -s ejre1.7.0_21 jre”, or whatever version you downloaded. That worked for me!
Cheers
Hi,
I have down loaded and unzipped the latest version of Java (jre1.7.0_21) on my DNS323 as per the instructions. I created a link to the ejre1.7.0_21 directory. ftp using ssh with filezilla shows the directories are there along with the “jre” link pointing to the ejre1.7.0_21 folder.
However:
root@DNS-STEPHEN:~# java
-sh: java: command not found
root@DNS-STEPHEN:~# java -version
-sh: java: command not found
Any ideas what’s wrong ?.
Thanks
Did you logout and login after the setting of the environment parameters?
Best Regards,
Uli
Hello Uli,
Yes I logged out and loginm agian. I also tried restarting the NAS – same result.
This morning I deleted the folder ejre1.7.0_21 using rm -r.
I then repeated the installation procedure. All the files were unzipped without errors, and all the commands executed without errors.
To check the symbolic “jre” link is working I ran the dir commands;
root@DNS-STEPHEN:/ffp/opt/java/jre# dir
COPYRIGHT README THIRDPARTYLICENSEREADME.txt bin lib release
root@DNS-STEPHEN:/ffp/opt/java/ejre1.7.0_21# dir
COPYRIGHT README THIRDPARTYLICENSEREADME.txt bin lib release
However;
root@DNS-STEPHEN:~# java -version
-sh: /ffp/opt/java/jre/bin/java: No such file or directory
It seems “java” is not recognised.
java.sh in the /ffp/opt/java/jre/bin/ directory has 755 permissions
Any ideas what might be wrong ?, how do I check if the $path was correctly updated with in the environment variables ?.
Thanks
Hi stepheng,
i think there is something else wrong.
java is calling something which is not there, because it finds the correct java, but this is not executed.
Can you post a
Thanks
Best Regards,
Uli
Hi Uli,
What happens if you execute:
Best Regards,
Uli
I presume you mean just copy the command as you typed (i.e. no sh before or start afterwards ?).
root@DNS-STEPHEN:/ffp/opt/twonky# /ffp/opt/java/jre/bin/java
-sh: /ffp/opt/java/jre/bin/java: No such file or directory
It seems there is a permissions problem ?.
Thanks again