Java, Make and install

'' This article Based on work by phlegmer and frontalot. Originally by frontalot. at Linkstationwiki.org ''

1. Debian does not provide a java package so we will need to create our own. First, install the necessary packages:

apt-get install java-package fakeroot

2. java-package allows us to create an installable Debian Java package while fakeroot allows us to simulate a root environment without actually modifying any important files.

3. Download the latest java package compatible with the LinkStation. The best and latest PPC java package is available from IBM at http://www-106.ibm.com/developerworks/java/jdk/linux140/ (registration required, IBM calls PPC "pseries").

4. First become a non-root user. Next create an installable Debian package. Use the command:

fakeroot make-jpkg name_of_java_file.tgz

(Note: After you answer all the questions, be patient, it may take some time to complete)

If you get an error like this: tar: //IBMJava2-JRE-142.ppc.tgz: Cannot open: Permission denied tar: Error is not recoverable: exiting now tar: Child returned status 2 tar: Error exit delayed from previous errors The following should get you through this error: (you may need to be root to create the folder and chmod) cd / mkdir opt chmod 777 opt chmod 777 IBMJava2-JRE-142.ppc.tgz opt mv IBMJava2-JRE-142.ppc.tgz opt cd opt Don't for get to switch back to a non-root user for the next command fakeroot make-jpkg name_of_java_file.tgz

Be patient because this step may take some time

5. Su to root again. Install the newly created Debian package. Use the command:

dpkg -i new_java_ppc.deb

6. Verify the installation by running the following command:

java -version

7. That's it; there isn't anything more to do!

Originally by frontalot and edited by phlegmer from linkstationwiki.org