Synology and Java

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

For now it like to investigate the use of a Synology (DS-107+) NAS together with Java. This might be a good way to connect a JeeNode/Arduino to the internet. In the future I like to use a Raspberry Pi to connect to the internet, together with other functions of course.
Important is that I can run Java code in combination with the serial communication capabilities of the rxtxSerial library. I found a really nice post on how to install Java on a Synology, because I really don’t want to loose the steps described I’ll cite the text of the post below:


1. install ipkg
http://forum.synology.com/wiki/index.php/How_to_Install_Bootstrap

2. install jamvm

To start with you need to install the following packages with ipkg:

ipkg install classpath
ipkg install jamvm
ipkg install jikes
ipkg install zlib
ipkg install file

Once these have installed then you are almost ready to go.  Being a java developer, I was used to using javac and java to compile and execute programs, so jikes and jamvm didn’t sit well with me!  To get around this I created a symbolic link and a shell script in /opt/bin
These are as follows:
/opt/bin/java

ln -s /opt/bin/jamvm /opt/bin/java

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

/opt/bin/javac

/opt/bin/jikes -classpath /opt/share/jamvm/classes.zip:/opt/share/classpath/glibj.zip $*

Remember to change the permissions on the shells scripts to add the execute flag!

I found out that there is also a  rxtxSerial ipk package which can be installed on the Synology. To do this just enter ipkg install  rxtx_2.1.7r2-1_arm.ipk on the command-line (you have to be logged in as root).

The cited post referred to this page.
Another page about Java and Synology is found here.

I’m wondering what is possible having all this installed (and what I need to install further). The code I tested uses URLConnection related classes and is not working yet … will be continued.

2 thoughts on “Synology and Java”

    1. Hello Matthew,
      The Raspberry Pi is not for sale right now (or I had to bid on the eBay beta boards which would be a bit too expensive for me).
      You are right that I want to get a jvm running on it once I have one. I’m not sure if the Raspberry Pi project already provides a Java VM solution;
      if not I really going to try your suggestion.

      Thanks,
      Tim

Leave a Reply