Installing JRuby on OS X Using the SoyLatte Java 6 JDK

Posted by rue, Mon Mar 03 01:00:00 UTC 2008

headius often kindly tries to get me to actually overcome my lingering Java allergies to try to run JRuby and now my excuse of FreeBSD amd64 not being Java-friendly has been stripped away.

In reality JRuby of course is a great project running a pretty impressive platform, the JVM, so this should be an interesting experiment. headius suggested using the SoyLatte version of JDK/JRE and looks like not without cause. It is an implementation of Java 6 based off the BSD port. So, steps taken:

  1. Java
    1. Downloaded the amd64 binary from the Soylatte site (Intel Core 2 Duo is, oddly enough, kind_of? amd64—EM64T to be precise)
    2. The directory needs to be extracted somewhere, I chose /opt/local
      1. `cd /opt/local`
      2. `sudo tar xjvpf /path/to/tar.bz2`
      3. `sudo mv long_name soylatte16`
    3. Set the Java environment variables (these go in my ~/.bashrc)
      1. export JAVA_HOME=/opt/local/soylatte16
      2. export PATH=/opt/local/soylatte16/bin:$PATH (front to make sure it overrides system JREs)
      3. I wanted to try NetBeans which expects certain paths: `ln -s /opt/local/soylatte16 /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home`
  2. JRuby
    1. Downloaded the 1.1b binary package
    2. Extracted in /opt/local again
      1. `cd /opt/local`
      2. `sudo tar xzvpf /path/to/tar.gz`
      3. `sudo mv long_name jruby`
    3. `export PATH=$PATH:/opt/local/jruby/bin` to make it visible, ~/.bashrc again
  3. Pick up the new envs: `source ~/.bashrc`
  4. Test: `jruby -v`
  5. Hooray!

Now to see if I can come up with something sensible to use this for.

Filed Under: mac | Tags:

Comments

Have your say

A name is required. You may use HTML in your comments.