Tag Archives: Java

HOWTO: Setup Java SDK and Maven 3 on a Synology DS1511+

The following blog is a quick summary how to install Java & Maven on a Synology NAS DS1511+. This NAS is based on the Intel(R) Atom(TM) CPU K525  @ 1.80GHz which makes it in theory a MacAir running 64bits Linux with a bunch of disks connected.

Install has been done under DSM: 3.1

 

 

Step 1, Download the Java 6 SDK for Linux

Get the 64 bits binary of Java SE Development Kit 6 Update 27 ( Works! )

jdk-6u27-linux-x64.bin  (Linux x64 – Self Extracting Installer)

Login into the Synology and wget the SDK:

wget http://download.oracle.com/otn-pub/java/jdk/6u27-b07/jdk-6u27-linux-x64.bin -O ./jdk-6u27-linux-x64.bin

chmod 755 jdk-6u27-linux-x64.bin
./jdk-6u27-linux-x64.bin

Move the unpacked directory into the /opt directory ( I presume you already using ipkg )

mv jdk1.6.0_27/ /opt/
cd /opt/
ln -s /opt/jdk1.6.0_27/ java


Step 2. Update your /etc/profile

Add the following line to your /etc/profile

JAVA_HOME=/opt/java  
export JAVA_HOME         
PATH=/opt/java/bin:$PATH

Save the file and log out and log in and try

./java

Java should welcome you.

 

Step 3. Maven 3 Install
Get the latest version of Maven from the maven site.
Unpack it and move it into /opt/

mv apache-maven-3.0.3 /opt/
cd /usr/local/lib/ 
ln -s /opt/apache-maven-3.0.3/ apache-maven


Step 4. Update your /etc/profile
Add the following line to your /etc/profile

 

M2_HOME=/usr/local/lib/apache-maven
M2=$M2_HOME/bin
MAVEN_OPTS=”-Xms256m -Xmx512m”
export M2_HOME MAVEN_OPTS M2
PATH=$M2:$PATH

Save the file, log out and log in again and give maven a try

./mvn –version

Maven should welcome you

 

Food for Thought! Java 7 Install failed for me on DSM 3.1

I’ve tried to get the latest version workign but both the 32 and the 64 bit version wont load. If anybody got this working please leave me a note how you archived it. Many thanks in advance

Java 1.7 64bits

./java
Error: dl failure on line 875
Error: failed /volume1/homes/admin/jdk1.7.0_64/jre/lib/amd64/server/libjvm.so, because /lib64/libc.so.6: version `GLIBC_2.4not found (required by /volume1/homes/admin/jdk1.7.0_64/jre/lib/amd64/server/libjvm.so)

 

Java 1.7 32bits

./java
Error: dl failure on line 875
Error: failed /volume1/homes/admin/jdk1.7.0/jre/lib/i386/client/libjvm.so, because /volume1/homes/admin/jdk1.7.0/jre/lib/i386/client/libjvm.so: cannot handle TLS data