Buffalo NAS-Central Forums

Welcome to the Linkstation Wiki community
It is currently Sat Oct 21, 2017 4:35 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: How to Install Java
PostPosted: Fri Aug 10, 2012 9:12 pm 
Offline
Regular Member

Joined: Sun May 06, 2012 1:45 am
Posts: 186
If you need to install Java, perhaps because you want to run serviio or filebot, here's how:

1) Download Java SE Embedded 6 & 7 from:

http://www.oracle.com/technetwork/java/ ... index.html

Choose the "ARMv5 Linux - Headless" versions. (You probably only need v6 or v7 but you might as well download both while we're here.)

Read the README for installation notes, but basically do the following steps (change file names as appropriate):

2) Copy the installation packages to a temporary location on your NAS, i.e. /mnt/disk1/share

3) telnet or ssh onto your NAS as user root and change to the directory where you want to install Java. If you have optware installed this will be /opt otherwise it will be /usr/local, i.e.

Code:
# if you have optware installed
cd /opt
Code:
# if you don't have optware installed
cd /usr/local

4) Install (unpack) Java 6 & 7

Code:
tar -xzvf /mnt/disk1/share/ejre-1_6_0_32-fcs-b05-linux-arm-sflt-eabi-headless-05_apr_2012.tar.gz
chown -R root:root ejre1.6.0_32

tar -xzvf /mnt/disk1/share/ejre-7u4-fcs-b20-linux-arm-sflt-headless-12_apr_2012.tar.gz
chown -R root:root ejre1.7.0_04

5) Create a soft link called jre that points to whichever version of Java you currently want to use.

This makes it easy to switch between different versions by just deleting and recreating the link.

For v6:
Code:
ln -s ejre1.6.0_32 jre
or, if you want use v7:
Code:
ln -s ejre1.7.0_04 jre

6) Add <JAVA_HOME>/bin to your PATH environment variable in order to run the Java binaries.

So, at the end of /etc/profile add the following line:

Code:
# if you have optware installed
PATH=/opt/jre/bin:$PATH
Code:
# if you don't have optware installed
PATH=/usr/local/jre/bin:$PATH

7) Log off and back in again and you're ready to go.


Last edited by ColinTaylor on Sun Sep 16, 2012 5:50 pm, edited 5 times in total.

Top
   
 Post subject: Re: How to Install Java
PostPosted: Fri Aug 10, 2012 10:14 pm 
Offline
Regular Member

Joined: Fri Jul 29, 2011 7:41 am
Posts: 82
Location: Denmark
Thanks for helping out with this. I'm getting this:
Code:
root@Nas:/opt# tar -xzvf /mnt/disk1/share/ejre-7u4-fcs-b20-linux-arm-sflt-headless-03_jul_2012.tar                                                                                  
gzip: invalid magic
tar: Child returned status 1
tar: Error exit delayed from previous errors


Any ideas?

EDIT: Nevermind. I just unpacked using OSX's unarchiver. I had to use the full path when making the jre link, but then it also works. Thanks for the help.


Top
   
 Post subject: Re: How to Install Java
PostPosted: Fri Aug 10, 2012 10:57 pm 
Offline
Regular Member

Joined: Sun May 06, 2012 1:45 am
Posts: 186
jackiass wrote:
Thanks for helping out with this. I'm getting this:
Code:
root@Nas:/opt# tar -xzvf /mnt/disk1/share/ejre-7u4-fcs-b20-linux-arm-sflt-headless-03_jul_2012.tar                                                                                  
gzip: invalid magic
tar: Child returned status 1
tar: Error exit delayed from previous errors


It looks like you have unzipped the file before running the tar command. That's not in the instructions! The z in "tar -xzvf" does this for you.

The latest version of v7 that I can download is 12_apr_2012 but yours is 03_jul_2012? Is it a non-English version?

Was it a tar or a tar.gz? Perhaps your download utility is automatically unzipping it for you?


Top
   
 Post subject: Re: How to Install Java
PostPosted: Sat Aug 11, 2012 12:22 am 
Offline
Regular Member

Joined: Fri Jul 29, 2011 7:41 am
Posts: 82
Location: Denmark
perhaps it has been doing some auto unpacking. Got it to work at least. I just signed up and downloaded the latest for the arm5 headless one. It's in English.


Top
   
 Post subject: Re: How to Install Java
PostPosted: Sun Aug 12, 2012 4:28 am 
Offline
Regular Member

Joined: Sat Nov 11, 2006 10:56 am
Posts: 714
Word of warning java is very slow on a 1.6ghz VL

I tried it a few months ago for a minecraft server and it couldnt keep up

Ended up using my O2 Joggler that has a 1.3ghz atom that just about keeps up


Top
   
 Post subject: Re: How to Install Java
PostPosted: Sun Aug 12, 2012 6:39 pm 
Offline
Regular Member

Joined: Fri Jul 29, 2011 7:41 am
Posts: 82
Location: Denmark
For my purpose it should be fine. It just chews away in the night to find subs. No hurry.


Top
   
 Post subject: Re: How to Install Java
PostPosted: Fri Mar 17, 2017 11:56 am 
Offline
Total Newbie

Joined: Thu Mar 16, 2017 4:06 pm
Posts: 1
ColinTaylor wrote:
6) Add <JAVA_HOME>/bin to your PATH environment variable in order to run the Java binaries.

So, at the end of /etc/profile add the following line:

Code:
# if you have optware installed
PATH=/opt/jre/bin:$PATH
Code:
# if you don't have optware installed
PATH=/usr/local/jre/bin:$PATH



thank you for the tutorial!
java working well (for java version 7, v8 must be installed in another way i guess) only thing i didn't managed to add environment variable...
i open profiles with vi but file is empty. is it normal?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited