Install Java

From AwkwardTV

Jump to: navigation, search

As there is no Java install pkg for the AppleTV you have to use Soylatte instead. This is a port from the BSD Java to MacOS X. This page describes how to setup Java and X11 for running GUI apps.

Why should anyone want this: well, there are some nice apps out there, that require Java to run. If you want to run such a application on your AppleTV, you obviously have to provide a Java Runtime Environment.

Contents

Install Soylatte

  1. Download the Soylatte binaries (32-bit, Tiger/10.4 version) from http://landonf.bikemonkey.org/static/soylatte/.
  2. Establish an ssh connection to your AppleTV.
  3. Become root with: "sudo -s"
  4. Create the JavaVM.framework folder:
    1. mkdir /System/Library/Frameworks/JavaVM.framework
    2. mkdir /System/Library/Frameworks/JavaVM.framework/Versions
    3. mkdir /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0
    4. ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0 /Library/Frameworks/JavaVM.framework/Versions/1.6
    5. mkdir /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
    6. ln -sf /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home /Library/Frameworks/JavaVM.framework/Home
  5. Extract the contents of the archive and copy the contents of the folder to /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
  6. Change permissions of that folder:
    1. chmod -R 755 /System/Library/Frameworks/JavaVM.framework
    2. chown -R root:wheel /System/Library/Frameworks/JavaVM.framework
  7. Export the java variables:
    1. echo "export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home" >> ~/.profile
    2. echo "export PATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin:$PATH" >> ~/.profile
    3. reboot

Now type "java -version" in the console. There should be some output like this:

java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00)
Java HotSpot(TM) Server VM (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00, mixed mode)

Install X11

If you want to run Java applications with graphical user interfaces, then you have to install X11. The Soylatte Java version has no native user interface so all Java GUI programs look like ugly x11 software, but hey, that's better than nothing.

There are two options. Either you install X11 from an Intel Tiger DVD or download the latest X11 Update for 10.4 from the Apple Download Page.

Install X11 from an Tiger Install DVD (Intel)

Open "Optional Installs" on the Tiger Install DVD. Then select X11 and install it. (untested)

Install X11 Update for Tiger 10.4.x

Link to latest X11 update: http://www.apple.com/downloads/macosx/apple/macosx_updates/x11update2006113.html. Just download it and follow the guide below.

Modification & Installation of the Package

To Install the "X11Update2006.pkg" you have to modify the package:

  1. Right-click -> "Show Package Contents"
  2. Open "Contents"
  3. Edit the File "X11Update2006.dist"
  4. After editing, the function "installationCheck()" should empty. (Only {})
  5. Install the pkg with "sudo installer -pkg X11Update2006.pkg -target /"
  6. Have fun.

Edited by --Johnlikesit 22:30, 5 June 2009 (CEST)

Personal tools