13 March 2008

Java 1.6 via SoyLatte on MacOS X 10.4.11



I just downloaded, expanded and ran Java 1.6 on MacOS X 10.4.11 using the advice from this blog entry by Robert Dempsey. Unfortunately Robert's blog is no longer available, but I did find his video still available on Vimeo:

Installing the JDK 1.6 on Mac OS X

After simply expanding the bzip2 archive, I am able to execute the Java binary:


$ ./soylatte16-i386-1.0.2/bin/java -version
java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_03_feb_2008_02_12-b00)
Java HotSpot(TM) Server VM (build 1.6.0_03-p3-landonf_03_feb_2008_02_12-b00, mixed mode)


Thanks, Robert!

The Java implementation is named SoyLatte and is a port of the BSD Java for MacOS X 10.4 and 10.5. Here's a blurb about the project from the website:


SoyLatte is a functional, X11-based port of the FreeBSD Java 1.6 patchset to Mac OS X Intel machines. SoyLatte is initially focused on supporting Java 6 development; however, the long-term view far more captivating: open development of Java 7 for Mac OS X, with a release available in concert with the official Sun release, supported on all recent versions of Mac OS X.


There's even work going on to integrate with an Aqua look and feel library named Quaqua which looks pretty interesting.

Additionally, at the bottom of the page, the author (some cool dude named Landon Fuller) indicates:


I hope to contribute this work to OpenJDK as soon as is feasible.


And it appears that Landon is also going to have a SoyLatte BOF at JavaOne 2008. I'll have to check it out while I'm in SF that week.

For history sake, I did find that Landon offered the first preview release of SoyLatte back in November of 2007 via this Artima posting titled Landon Fuller Ports OpenJDK 6 to OS X as well as an interview with Landon on JavaLobby.

Thanks, Landon!

Update

FWIW, a friend let me know that SoyLatte will only run on Intel-based Macs.

120 comments:

  1. Bruce,

    Glad we could help. I was happy at how easy it was to get SoyLatte running on my Mac. It is much better than it used to be. Happy progging!

    - Robert

    ReplyDelete
  2. IF this works i'm going to be a happy man - and only because then i can use Gratepic to post comments on flickr pictures - which needs java 1.6 ... thanks for your work - you were not easy to find.

    ReplyDelete
  3. it did not work on my 10.4.11

    i looked at the atlantic site and they do not seem to have an answer on why it does not work.

    i am curious what were the specs on the 10.4.11 computer you were able to make it work on?

    ReplyDelete
  4. MacBook Pro 2.6Ghz Intel Core 2 Duo with 4GB memory. I think also got this working on my old MacBook Pro 2.16Ghz Intel Core Duo with 2GB memory. I even had another MacBook Pro in between those two where it worked but I don't recall the exact specs on that one.

    ReplyDelete
  5. hi bruce,

    my computer runs with mac os x 10.4. I tried to install a bibliographic references manager programm called SciPlore_MindMapping but it didn't work. A new version of java (1.6) was required. I search in internet and saw that apple didn't developed this version to os x 10.4. Your site is the only place were I saw a solution.
    But, how I'm a commun user, this thing sounds like greek.
    Could you explain me how I can run 1.6 in my computer?
    tks a lot

    ReplyDelete
  6. @Leandra, If you are using Mac OS X 10.4, then the SoyLatte JDK will run Java 1.6 for you. Download it from the SoyLatte website here:

    http://landonf.bikemonkey.org/static/soylatte/

    I hope this helps.

    Bruce

    ReplyDelete
  7. Bruce,
    I am trying to download the same application as Leandra. So i too needed Java 1.6 on my mac OS 10.4.11. Well i had a couple of questions. I was able to download "soylatte16-i386-1.0.3.tar.bz2" without entering any user name or password. Now my problems start after i get start accessing the command. I am not able to trace the path to the bin folder. So i am not sure what exaclt yto do. can you suggest something?
    JK

    ReplyDelete
  8. @Kiran, I just downloaded soylatte16-i386-1.0.3.tar.bz2, expanded it and the bin directory is there. Here's the directory listing:

    COPYRIGHT
    LICENSE
    README.html
    README_ja.html
    README_zh_CN.html
    bin
    demo
    include
    jre
    lib
    man
    sample
    src.zip

    Note that the bin directory is the sixth item listed above.

    Bruce

    ReplyDelete
  9. Bruce Bin was the first tile when i downloaded. When i am in Terminal, and type open Applications/TextEdit.app ~/.profile i keep getting the message "No such file ". Also what is the (sig) part of the link? is that the one i have to download?
    KIran

    ReplyDelete
  10. @Kiran, I'm not sure why you're asking me about opening your .profile. Just open TextEdit, do a File->Open, and then while you are sitting in the Open dialog box, type shift-command-. and you will be able to see all dot files.

    I'm not sure what you mean when you are asking about the sig part of the link. What are you trying to download? In your previous comment, you mentioned that you had already downloaded the soylatte16-i386-1.0.3.tar.bz2 file. Once you download that file, you need to expand it. You can do this in the Terminal using the following command:

    $ tar jxvf soylatte16-i386-1.0.3.tar.bz2

    This will expand the tarball and create a directory named soylatte16-i386-1.0.3 where you will find the bin directory.

    Bruce

    ReplyDelete
  11. Bruce pretty novice with Macs. I was following Robert Dempseys video on downloading JDK 1.6 on Macs. Heres the link http://blog.adsdevshop.com/2009/03/17/installing-the-jdk-16-on-mac-os-x-the-video/. SO i was following his instructions. But never went beyond the echo $PATH part as when i did open Applications/TextEdit.app ~/.profile as he explains in the video, it keeps giving me "no such file /Users/kiran/Applications/TextEdit.app
    " and I am not able to get past that. So all the confusion is purely due to my lack of knowledge about how the commands work. So are you suggesting something different than Robert? I know i am not doing something right there . just not sure what.

    ReplyDelete
  12. @Kiran, Now I understand, you are trying to add the soylatte16-i386-1.0.3 directory to the PATH environment variable in your .profile. Your problem is simply a leading slash (/) before Applications. This is the full path to the Applications directory where the TextEdit.app lives. Copy/paste the following command in the Terminal:

    $ open /Applications/TextEdit.app ~/.profile

    Hope that helps.

    Bruce

    ReplyDelete
  13. Bruce, well one step closer to success. I could open ".profile" in text editor with the command u gave me. I figured i had to omit the $ in that command when i copy /paste into the terminal. Also I had to give a "space" between ".app" and "~" . Only then it opened up. Well however, unlike in robert Dempsey's video, where the path was displayed in the texteditor for ".profile", mine was blank. nothing was displayed at all. Do you have any suggestions?

    ReplyDelete
  14. @Kiran, Sure, just get the full path to the soylatte16-i386-1.0.3/bin directory as the video demonstrates. Let's say that this is the path I have on my computer:

    /Users/bsnyder/soylatte16-i386-1.0.3/bin

    Notice that there are no spaces in the path to the soylatte bin directory. While this is not required, it is the easiest way for beginners. Then I would add the full path to the soylatte bin directory to the .profile like this:

    export PATH=/Users/bsnyder/soylatte16-i386-1.0.3/bin:$PATH

    Save the .profile. Then open a new tab in the Terminal and type 'java -version' as the video demonstrates. You should see the Java version command's output.

    Bruce

    ReplyDelete
  15. Bruce.... Hurray! Success at last.The java version now displays as 1.6.0_03-p3, which is what i think is the correct stuff going by the video.Thanks a lot again for all the guidance. However when i tried to download SciPlore Mindmapping software it told me that my version of java was 1.5.0_19, installed in System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home. Would you happen to know a fix for this?

    ReplyDelete
  16. @Kiran, You need to set the JAVA_HOME variable to point at the soylatte directory. And you need to make sure that the SciPlore Mindmapping software can see the specific JAVA_HOME that you are setting. It might be best that you also put it in your .profile like so:

    export JAVA_HOME=/Users/bsnyder/soylatte16-i386-1.0.3/

    The important thing is that the SciPlore software needs to use that JAVA_HOME variable.

    Hope that helps.

    Bruce

    ReplyDelete
  17. Bruce it didn't work
    Now i have the following in my .profile
    export PATH=/Users/kiran/Documents/soylatte16-i386-1.0.3/bin:$PATH
    export JAVA_HOME=/Users/kiran/Documents/soylatte16-i386-1.0.3/
    I hope thats exactly what you wanted me to do. May be i will re start try to reinstall and see what happens

    ReplyDelete
  18. @Kiran, What you added to your .profile is correct. I hazard a guess that the problem is that you are double-clicking on the SciPlore Mindmapping software to start it. By doing this, it is not aware of the JAVA_HOME that you have set in the Terminal environment. If you start up the SciPlore software from the Terminal using the full path to the SciPlore binary, it should pick up the JAVA_HOME correctly (unless it sets its own JAVA_HOME in a startup script).

    My advice to you is to find out where you need to set the JAVA_HOME for the SciPlore software. After looking around the SciPlore website, I was unable to locate a mailing list where you can ask questions about the software. The best thing I found was a contact form here:

    http://www.sciplore.org/contact_en.php

    Best of luck,
    Bruce

    ReplyDelete
  19. Bruce, i have already written to them and I am awaiting their reply. When i do hear back i will keep you posted as well.
    Thanks
    Kiran

    ReplyDelete
  20. Bruce, i did a little more web search. May be if you visit this link,
    blogs.sun.com/cmar/entry/java_1_6_finally_available
    there might be a solution in site. I don't completely understand the lingo there but may be you could suggest something!

    ReplyDelete
  21. @Kiran, Java 1.6 has been available on Mac OS X Leopard (10.5.x) for about three years now. Mac OS X Leopard only runs on a Mac with an Intel processor (i.e., it will not run on PPC).

    ReplyDelete
  22. Dear Bruce,
    Did you mean that I cannot use soylatte on my ppc based labtop? I had followed the instructions in this blog but I couldn't open the ".profile"

    ReplyDelete
  23. @荔枝與荔枝殼, According to the documentation for SoyLatte, an Intel processor is required.

    Bruce

    ReplyDelete
  24. I am unable to find a ".profile" file, I am running Mac 0SX 10.4.11. Any time I attempt the
    "$ open /Applications/TextEdit.app ~/.profile "
    it tells me
    "No such file: /Users/charles/.profile"

    ReplyDelete
  25. @Charles, That's not a problem. You just need to create the .profile file in your home directory (/Users//). Then you will be able to open it and add the correct PATH.

    Bruce

    ReplyDelete
  26. For some reason this is not working. I currently only have two lines in my ".profile" file (the equivalent of what KK had). Is that all that is needed? I have ".profile" and the soylatte file in the same file (not sure if that matters).
    My problem right now is that there is nothing happening so I have nothing to report to help you help me. Any suggestions on what I can tell you to help me?

    ReplyDelete
  27. Bruce,

    One thing that does work is when I type:
    $ ./soylatte16-i386-1.0.2/bin/java -version
    I get more or less what you have in the article. But when I just type
    "java -version" I get the old java version.

    ReplyDelete
  28. @Charles, That is a symptom of the PATH not being set up correctly. In your ~/.profile you should have the following:

    export PATH=/Users//path/to/soylatte16-i386-1.0.2/bin/:$PATH

    That will put the SoyLatte JVM in the PATH before anything else. Then you just need to start a new terminal so that it re-reads the .profile and it should work.

    Bruce

    ReplyDelete
  29. Bruce,
    I am not certain why your .profile line looks like that, but I tried it and it did not work. I found the path to the bin file and used it in there and this is an exact copy:

    export PATH=/Users/charles/soylatte16-1.0.3/bin/:$PATH
    This is what makes most sense to me, but as a very novice programmer, some things that make sense to me are wrong.
    I feel that something else is going wrong with my .profile file, is its location important?

    ReplyDelete
  30. Thank you so much Bruce, your advice in the comments section allowed me to install the beta 1.7 PPC version... post JAVA 1.5 on a ppc!!! woohoo. to create a new .profile I typed [[ nano .profile ]] in terminal, then typed in the path, saved it. then followed your advice and voila!

    ReplyDelete
  31. @jules, Excellent! I'm happy to hear that the information here helped you out.

    ReplyDelete
  32. This comment has been removed by the author.

    ReplyDelete
  33. @jules, I really need help to put 1.7 on PPC 32bits.

    Let me see if i understand, first i don t have .profile on my MAC.

    1- Create .profile by typing [[ nano .profile ]] on terminal at ~ location.

    2- At .profile path put this line:
    export PATH=/Users/path/soylatte17-1.0.3/bin/:$PATH

    3- And this line:
    export JAVA_HOME=/Users/path/soylatte17-i386-1.0.3/

    4- Save .profile file

    5- Type java -version on terminal, and then will apear java 1.7 version

    6- Just double click on jar file and voillá..

    Its just this?
    I need some special terminal? like x11
    I am new at this..

    ReplyDelete
  34. @Ricardo, there is no special terminal required. But please note that once you have created the ~/.profile you must exit the terminal and then re-open it. This will force the new ~/.profile to be read by the terminal and cause the PATH to be set up appropriately. After doing this, you will be able to type 'java -version' in the terminal.

    ReplyDelete
  35. So, after hours of trying to follow along I simply cannot get this

    I try your commands in but it won't work, it's like Kiran's problem, only I can't seem to solve it

    First off, when I did the echo $PATH thing, what came up was rather small -- /bin:/sbin:/usr/bin:/usr/sbin -- in fact, if it means anything

    Secondly, which is where my problem comes in...when I do the

    open /Applications/TextEdit.app ~/.profile

    it says...
    2011-06-08 01:44:05.340 open[433] No such file: /Users/al/.profile


    I've looked up and seen I had no .profile it seemed, but after a little fiddling I have something called ".profile.save" which is empty (which I opened via terminal)

    I can pretty much do everything else, except I can't get that command to go through, to open my .profile, to be able to enter the path in textedit...Any idea what's wrong?

    ReplyDelete
  36. The reason that you are not able to edit the .profile file is because it does not exist. So first you need to create the file using the following command:

    touch /Users/al/.profile

    That will create the file and allow you to open it in TextEdit.

    But since you already have a file that you created named .profile.save, then just change the name using the following command:

    mv .profile.save .profile

    This will rename the file. Once the file is renamed, you can add the correct path to that file. Then you will will need to quit the Terminal and open it again. This will force the Terminal to read your new .profile file. Once Terminal is restarted, echo the PATH to make sure it picked up your new .profile using the following command:

    echo $PATH

    Hopefully this time it will have the path you added and you will be able to run the Soy Latte JVM.

    Hope that helps.

    ReplyDelete
  37. Great, it seemed to create the .profile, thanks

    However...now it says...

    2011-06-14 01:22:07.363 open[685] LSOpenFromURLSpec() returned -10814 for application (null) urls file://localhost/Applications/TextEdit.app/, file://localhost/Users/al/.profile.

    And TextEdit doesn't open up at all

    Furthermore, I exited out of terminal, and now when I start it up, it says...

    -bash: /Users/al/.profile: Permission denied


    Any ideas, or am I forever doomed as it seems I am

    ReplyDelete
  38. You will need to fix the permissions on the .profile file. I'm not sure why they are not correct if the file was created by your user. You can use the chmod and perhaps the chown commands to change the permissions and ownership from the Terminal, but this may be confusing if you're not a Unix guru. For beginners and non-Unix folks, I recommend using the 'Get Info' command from the Finder instead (i.e., locate the file in the Finder, select it and pull down under File to Get Info). Then just expand the section on Sharing & Permissions and you will be able to change the privileges. Changing ownership is more complex. Although this document is rather old, it is described here:

    http://support.apple.com/kb/TA20907

    Hope that helps.

    ReplyDelete
  39. Well, the owner was on 'system' so I changed that to al (the current user that's used on the computer) and I also changed the group from admin to al

    However nothing has changed and terminal still displays the same thing, both before and after I changed each setting (from system to al and from admin to al)

    ReplyDelete
  40. @water_adept, are you still getting the permission denied error? If so, it sounds like you will need to change the file permissions. Before attempting to do this, I need to see the file permissions. Please do a ls -l /Users/al/.profile and paste the output here.

    ReplyDelete
  41. For some reason, Blogger occasionally sends me emails to let me know that someone has posted a comment on one of my blog posts and yet when I visit the blog post, the comment is not there. This is what happened with the following comment so I am manually posting it myself:

    =====================================

    simona has left a new comment on your post "Java 1.6 via SoyLatte on MacOS X 10.4.11":

    Ciao, i have a mac os x 10.4 and i need to use a tool which requires java6 to be installed. I have installed soyalatte (soylatte16-i386-1.0.3), presumably correctly, since if i type "java -version" i obtain:

    ************************************************
    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).
    ************************************************

    To install soyalatte i have modified the file .tcshrc, adding the following lines:

    setenv PATH /Applications/soylatte16-i386-1.0.3/bin:${PATH}
    setenv JAVA_HOME /Applications/soylatte16-i386-1.0.3/

    Moreover, if i type "echo $PATH" and "echo $JAVA_HOME" i also get what i would expect.

    However, when i lunch my tool, i still obtain the following error message:

    ************************************************************************
    #An error occurred while launching/running the application.

    Title: ALMA Observing Tool (Cycle0)
    Vendor: Atacama Large Millimeter Array
    Category: System Configuration

    The application has requested a version of the JRE (version 1.6+) that currently is not locally installed. Java Web Start is unable to automatically download and install the requested version. This JRE must be installed manually.

    *************************************************************************

    which i think it means that it is not considering the new version of java that i have installed.

    Note that, if i modify the file .profile, adding the following lines:

    export PATH=/Applications/soylatte16-i386-1.0.3/bin:$PATH
    export JAVA_HOME=/Applications/soylatte16-i386-1.0.3/

    the soyalatte installation would not work, i.e. if i type "java -version" i obtain:

    ********************************************
    java version "1.5.0_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-306)
    Java HotSpot(TM) Client VM (build 1.5.0_19-138, mixed mode, sharing)
    ********************************************

    which is the old version of java installed.

    What am i doing wrongly?

    Could anyone please please please help me?

    Many thanks in advance

    Simona

    ReplyDelete
  42. @simona, It sounds to me like the software you are trying to run does not use the path that you configured in the .tcshrc file. This is not uncommon because the .tcshrc is only read by the tcshell. This is why I recommend setting the path in the .profile for this very reason. The .profile will be read by any shell.

    But in your case, you need to figure out where the software is getting the PATH. You may just want to set the PATH locally in the shell before running the software instead of inside a config file. What would be even better is if the software is started from its own script that you could modify to add your own PATH.

    ReplyDelete
  43. Very strange, simona posted a follow-up comment but when I visit the comments in the blog entry, it's not there. So I'm posting it manually again:

    ======================================

    Hi Bruce, thank you! I tried for first the option of editing the .profile file, but as i told you in my long post above it did not work. However, i have modified the .profile too, as suggested in this blog.

    Could you please tell me which are the commands to set the PATH locally in the shell before running the software instead of inside a config file?

    and/or

    How should i start the software from its own script?

    Thanks again

    PS
    You wrote:
    For some reason, Blogger occasionally sends me emails to let me know that someone has posted a comment on one of my blog posts and yet when I visit the blog post, the comment is not there. This is what happened with the following comment so I am manually posting it myself.

    Does it depend on me?

    ReplyDelete
  44. @simona, I have no idea if it is something that you are doing or what. I'm honestly puzzled by it.

    Anyway, to set the PATH locally in the shell, use the command that you showed earlier:

    $ export PATH=/Applications/soylatte16-i386-1.0.3/bin:$PATH

    This will change the environment for that terminal only. Then you will need to manually start up the software using a command-line command from within this shell.

    My suggestion to start the software from a script was to write your own script that contains commands to set the PATH and then start the software. To do this, you will need to become proficient with shell scripts. See the following tutorial on shell scripts:

    http://www.freeos.com/guides/lsst/

    ReplyDelete
  45. If I followed correctly, then this what I got when I put that in

    -rw------- 1 root al 99 Jun 8 01:19 /Users/al/.profile


    And yes, I'm still getting the permission is denied message

    Thanks

    ReplyDelete
  46. Ciao Bruce, i solved my problem simply by reinstalling the software, after having installed soyalatte and now it works! Thank you very much for your help!!! Simona

    ReplyDelete
  47. @simona, I'm very happy to hear that you solved your problem. Ciao!

    ReplyDelete
  48. Hi Bruce,
    I've followed your excellent instructions - I'm getting "/Users/ron/soylatte16-i386-1.0.3/bin/java: cannot execute binary file"

    I'm running a PPC G4 on OSX 10.4.11. Am I right in assuming this needs 10.5 and won't work on 10.4?

    ReplyDelete
  49. @ronsurf, The problem is not the operating system version. As I stated in the blog post, it runs just fine on 10.4.x. I believe your problem is due to the CPU being a PPC and not an Intel.

    ReplyDelete
  50. Hi Bruce:
    I followed your instructions as per this blog to install the soylatte1.6-1.0.3 on my Mac OZ 10.4.11 but I still could not get the correct Java version on my Terminal -tcsh-80x24 - it showed the old Java version 1.5.0_19-b02-306.

    This is what I have on the the .profile:
    export PATH=/Users/wendy/Desktop/soylatte16-1.0.3/bin:$PATH
    export JAVA_HOME=/Users/wendy/Desktop/soylatte16-1.0.3/

    Can you please tell me what I am doing wrong and how to fix it? Appreciate your help!

    wendy

    ReplyDelete
  51. oops! I mean Mac OS 10.4.11.

    ReplyDelete
  52. Hi Bruce:

    I keep trying and this is what I have gotten even after adding the command export PATH=/Users//path/to/soylatte16-1.0.3/bin/:$PATH in my .profile (the very 1st command, followed by the other 2 I showed in my previous posting):

    [Wendy-Tans-Computer:~] wendy% echo $PATH soylatte16-1.0.3/
    /bin:/sbin:/usr/bin:/usr/sbin soylatte16-1.0.3/
    [Wendy-Tans-Computer:~] wendy% java -version
    java version "1.5.0_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-306)
    Java HotSpot(TM) Client VM (build 1.5.0_19-138, mixed mode, sharing)

    ReplyDelete
  53. @wendy, I will take guess that perhaps you may not have sourced the new .profile after adding your changes. To source the .profile again, just quit the Terminal app and start it up again. After doing this, then echo the variables to see if they are showing up properly:

    $ echo $PATH
    $ echo $JAVA_HOME

    The output from each of these commands should show the paths that you have set.

    ReplyDelete
  54. Hi Bruce, I tried both commands and they both gave me "command not found" and "undefined variable" respectively. Since I can't get it to work and I needed the JRE to operate a program that I needed to work on urgently, I went to buy a new MBP. It is not the best option, but time is of the essence.

    Thank you so much for your help. It is a very informative blog!
    wendy

    ReplyDelete
  55. @wendy, Well, that's one option I guess, albeit a pricey one just to get Java working.

    ReplyDelete
  56. Thanks Bruce for answering everyone's questions. Finally got the path where I want it. But now I can't remember the name of the Java file I wanted to run! LOL

    ReplyDelete
  57. @Kiai Kim, I'm happy to hear that the info here has helped you out. Good luck!

    ReplyDelete
  58. Well Bruce, the old computer does not belongs to me and I'd have to return it eventually, so I just went and buy a new one. It is pricey, yes! I wish I didn't have to do that but I have too much data on that old computer plus I am working out of an external drive because it didn't have enough memory capacity for my data (only 200 GB) it is a bit annoying to work out of an external drive because each time I open my data file, it starts to browse for the source file. So I guess new computer it is. I really appreciate all your help in this blog for all of us novices.

    ReplyDelete
  59. Alright, so I've spent a while reading throughthis blog trying to get this to work and when i type in java "version i get -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) Client VM (build 1.6.0_03-p3-landonf_19_aug_2008_14_55-b00, mixed mode)" So i changed the configurations for an application called minecraft to use java 1.6+, However when i open up the application,It says this application requires java 1.6 or later and it say i only have java 1.4-1.5.

    ReplyDelete
  60. I'll bet that Minecraft is not picking up the Java 1.6 binary from the PATH. Try starting up Minecraft from the command-line in the terminal that properly reports the Java version as 1.6.

    ReplyDelete
  61. To launch Minecraft from the command-line in the Terminal, you will need to do the following:

    1) Open the Terminal
    2) Run the following command:

    $ /Applications/Minecraft.app/Contents/MacOS/JavaApplicationStub

    This will start up the Minecraft user interface. As long as the PATH variable is set up properly before you start up Minecraft using the command above, it should pick up Java 1.6.

    ReplyDelete
  62. Hello Bruce,

    First I would like to say excellent post and thanks. After alot of tweaking I finally got the path set the way i needed. but when i run 'java -version' i get "cannot execute binary file" .. is there a special download for soylatte for 10.4.11 PowerPC based mac?

    Thanks,

    ReplyDelete
  63. @Joe, From the SoyLatte project page, you can download the binary that is labeled as '32-bit JDK for Mac OS X 10.4 and 10.5':

    http://landonf.bikemonkey.org/static/soylatte/#get

    If I recall correctly, that is the one that I used, but it's now been about 2.5 years.

    ReplyDelete
  64. OK Bruce or Robert i love to play runescape and runescape private servers and what not i am running a ibook g4 and can't seem to do what you have done i followed Roberts tutorial on how to do it but the textedit.app -/.profile will not open to show me that path where i need to stick the bin folders path help!

    ReplyDelete
  65. @Tyler, thanks for giving it a shot, but I've got some bad news for you. An iBook G4 contains a PowerPC processor and, unfortunately, the SoyLatte JDK only runs on Mac with an Intel processor.

    ReplyDelete
  66. This comment has been removed by the author.

    ReplyDelete
  67. This comment has been removed by the author.

    ReplyDelete
  68. Hello, thank you for creating this blog. I have followed every instructions from previous comments...

    so I type java -version and this is my result:

    $ java -version
    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)

    $echo $PATH
    /Users/fish/soylatte16-1.0.3/bin:/bin:/sbin:/usr/bin:/usr/sbin

    I used javatester.org but it shows that I have Java version 1.5, same as the previous version that I had. What did I do wrong?

    Thanks

    ReplyDelete
  69. @Fish Of Fate - The problem that you're experiencing is due to the context of the $PATH variable that you have defined. When you change the $PATH only in the .profile, it will only be available to applications that are started from a shell that sources that .profile. If you want it available to the wider system (I suspect that you're double-clicking on the game) then you need to define it in a manner that provides it to the wider context of the entire operating system. In your situation, you can do one of two things:

    1) Start up the app from the shell that sourced the .profile. You can do this by starting up the binary that you want to run from the command-line using the fully qualified path (e.g., /Applications/Safari/Contents/MacOS/Safari). This will give Safari access to the environment that is created in that shell.

    2) Use the Java Preferences to define it in a system wide manner (it's located in the /Applications/Utilities/Java Preferences directory).

    ReplyDelete
  70. Hello, thanks for replying.

    From the first instruction do you mean opening Safari/Firefox from the Terminal?

    I typed the following commands:

    open -a /Applications/Safari.app
    open -a /Applications/Firefox.app

    After that I tried testing my version of Java in Javatester.org. It shows "Java Version 1.5".

    I also tried:
    open -a /Applications/RuneScape.app

    it still doesn't work.


    For the second instruction, do you mean by entering commands into the Java Applet Runtime Parameters? I am not sure what commands to enter into the box...

    Thanks.

    ReplyDelete
  71. @Fish of Fate, Yes, I mean opening the browser or game from the command-line. I'm guessing that the reason this is not working for you is because of the order of the Java versions in the Java Preferences.

    To open the Java Preferences, go to /Applications/Utilities and open the Java Preferences app. In the General tab, you need to drag the Java SE 6 item to the top so that it's above the Java SE 5 item. This will determine which version of Java is able to be seen by apps in a system wide manner. Putting Java SE 6 as the first/top one in the list should make it be seen by Safari and RuneScape.

    After making this change, you must restart the browser or the terminal so that it sees the change. Only after restarting the browser should you make use of javatester.org.

    ReplyDelete
  72. Hello, thanks for the reply.

    Yes I've opened the Java Preferences before but there is no Java 6 in the list. Only Java 5.0 and Java 1.42. Am I suppose to "install" it?
    I've done JAVA_HOME in the .profile too.

    ReplyDelete
  73. @Fish of Fate, that's a really good question -- I'm not sure how to get SoyLatte to show up in the Java Preferences app. I've looked around some and I can't find a way to do it. If I find a way I will let you know.

    ReplyDelete
  74. Thanks Bruce! I will try to search around too.

    I can't use Java 6 even though I open Safari/Firefox through Terminal. Do I need to get Java 6 up in the Java preferences first?

    ReplyDelete
  75. I hate to take a 6 month hiatus, but I saw I never got answered previously, and I'm still unable to run this program what with my earlier problems...I'll copy and paste what I previously said


    'If I followed correctly, then this what I got when I put that in

    -rw------- 1 root al 99 Jun 8 01:19 /Users/al/.profile


    And yes, I'm still getting the permission is denied message'

    ReplyDelete
  76. @water_adept, For the .profile, I see the following:

    * The file owner is 'root' and the group is 'al'
    * The file permissions are read and write for root and not other permissions

    I'm guessing that the reason you are seeing the 'permission denied' error is because you are executing the file as a user other than root. I don't know what user is executing this file, but I'm willing to bet that it's the 'al' user.

    To fix this, you need to change the ownership of the file. This is achieved using the chown command line utility. However, because the owner of the file is the root user, the chown utility must be executed by the the root user.

    To do this, you would typically become the root user using the su utility like so:

    $ su - root
    password:
    % chown al:al /Users/al/.profile
    % ls -l /Users/al/.profile
    -rw------- 1 al al 99 Dec 4 22:31 /Users/al/.profile

    In the example above, I became the root user, then I used the chown utility to change the ownership of the file and then I listed the file just to make sure it looks good. I took a guess that there is a user named al and a group named al. You may need to adjust this to match your user and group.

    Once the .profile is owned by your user instead of the root user, the 'permission denied' error should no longer occur.

    ReplyDelete
  77. I wish I were a bit more savvy at this to maybe be a bit more helpful, lol

    There's a user named al, but as for group I wouldn't have any idea...I would assume so as it being the main user for the computer

    Whatever you did there however didn't seem to do anything in terminal, unless I was supposed to do something else ?

    ReplyDelete
  78. Hi Bruce, it's me FishOfate. I downloaded and installed Java Developer 1.6 and I can play RuneScape without Terminal this time. But my RS crashes all the time after long hours of playing. But that is my only fix because soylatte doesn't work for me. Thanks for your help and comments.

    ReplyDelete
  79. @water_adept It's OK if there's not a group named al, you can still chown the file for only your user like this:

    $ su - root
    password:
    % chown al /Users/al/.profile
    % ls -l /Users/al/.profile
    -rw------- 1 al al 99 Dec 4 22:31 /Users/al/.profile

    So after doing this, what do the permissions on the file look like? Please do a ls -l and then copy/paste the results for me to see.

    ReplyDelete
  80. @Fish De Caelcum, I'm happy to hear that you found a solution. I'm sorry that RuneScape crashes a lot, you should contact the company to let them know this and to possibly figure out why. Best of luck.

    ReplyDelete
  81. It says no such job found, after the' % ls -l /Users/al/.profile ' line, and otherwise it just says command not found when I copy and pasted that, and the ls -l came up with...

    -bash: syntax error near unexpected token `;'


    Hope that helps

    ReplyDelete
  82. @water_adept, I'm not sure why you got the error about no such job found -- the only thing that the ls command will do is list the directory or file (as long as the user running the command has the permission to view the file or directory). I'm also not sure why you got the syntax error near unexpected token ';' message. What were you copy/pasting?

    ReplyDelete
  83. I copy and pasted what came up after the ls -l command

    ReplyDelete
  84. @water_adept, Oh I understand now. What I actually wanted you to do is copy the results of the ls command and paste them in a comment here so that I could see them.

    ReplyDelete
  85. Hm, this ?

    dalems:~ al$ ls -l
    total 0
    drwxrwx--- 30 al al 1020 Dec 21 01:18 Desktop
    drwx------ 7 al al 238 Mar 5 2011 Documents
    drwx------ 34 al al 1156 Nov 17 02:12 Library
    drwx------ 3 al al 102 Sep 27 2006 Movies
    drwx------ 6 al al 204 Aug 2 2010 Music
    drwx------ 9 al al 306 Apr 4 2011 Pictures
    drwxr-xr-x 5 al al 170 Jun 15 2007 Public
    drwxr-xr-x 6 al al 204 Dec 29 2006 Sites

    ReplyDelete
  86. @water_adept, Because the .profile file's name begins with a dot, you will need to list all files by adding the -a option like so:

    $ ls -al

    ReplyDelete
  87. Alright, this is what I got for that command:

    dalems:~ al$ ls -al
    total 96
    drwxr-xr-x 22 al al 748 Dec 27 19:03 .
    drwxrwxr-t 8 root admin 272 Dec 27 02:14 ..
    -rw-r--r-- 1 al al 3 Sep 27 2006 .CFUserTextEncoding
    -rw-r--r-- 1 al al 15364 Dec 24 17:27 .DS_Store
    drwx------ 3 al al 102 Dec 24 17:27 .Trash
    -rw------- 1 al al 7492 Dec 29 21:54 .bash_history
    drwxr-xr-x 5 al al 170 Jan 28 2007 .file_store_32
    drwxr-xr-x 10 al al 340 Oct 26 08:25 .jagex_cache_32
    -rw-r--r-- 1 al al 534 Dec 28 07:47 .parallels_settings
    -rw------- 1 root al 99 Jun 8 2011 .profile
    -rw------- 1 root al 33 Jun 8 2011 .profile.save.1
    -rw------- 1 root al 54 Jun 8 2011 .profile.save.1.save
    -rw------- 1 root al 1 Jun 8 2011 .profile.save.1.save.save
    drwxrwx--- 30 al al 1020 Dec 21 01:18 Desktop
    drwx------ 7 al al 238 Mar 5 2011 Documents
    drwxr-xr-x 2 al al 68 Dec 27 02:14 Incomplete
    drwx------ 34 al al 1156 Nov 17 02:12 Library
    drwx------ 3 al al 102 Sep 27 2006 Movies
    drwx------ 6 al al 204 Aug 2 2010 Music
    drwx------ 9 al al 306 Apr 4 2011 Pictures
    drwxr-xr-x 5 al al 170 Jun 15 2007 Public
    drwxr-xr-x 6 al al 204 Dec 29 2006 Sites

    ReplyDelete
  88. @water_adept, OK, notice in the paste above that the owner of the .profile is root and the group is al. What you need to do is make al the owner using the chown command. Because root is the current owner of the file, you will first need to become root so that you can use the chown command to change ownership of the file:

    $ su - root
    Password:
    $ chown al .profile

    Then run the ls command again and make sure that the .profile is now owned by the al user. Once you succeed in doing this, you will need to quit the Terminal app and start it up again.

    ReplyDelete
  89. How do I manage that ? With that command ? When I put in the su - root, it brings up the 'Password:' but then I cannot type or copy and paste a single line into it -- If I press enter it brings up 'su: Sorry'

    Am I supposed to do something else ?


    Sorry to be so bothersome, it is quite frustrating

    ReplyDelete
  90. @water_adept, It's just asking for you to enter the root user's password. It won't show progress as you type. Just hit the return key after you enter the root user's password.

    If you don't know the root user's password, you may be able to execute the chown command like this:

    $ sudo chown al .profile
    Password:

    This will allow your user to execute the chown command as the root user. It won't show progress as you enter the password either. Just hit the return key after you enter your user's password.

    ReplyDelete
  91. Great, that seemed to work, whatever it was supposed to do, lol

    I no longer get the permission is denied thing when I open up terminal - Nothing else has seemed to change, to me perhaps, when I did the ls command


    dalems:~ al$ ls -al
    total 104
    drwxr-xr-x 22 al al 748 Jan 1 17:37 .
    drwxrwxr-t 8 root admin 272 Dec 27 02:14 ..
    -rw-r--r-- 1 al al 3 Sep 27 2006 .CFUserTextEncoding
    -rw-r--r-- 1 al al 15364 Dec 24 17:27 .DS_Store
    drwx------ 2 al al 68 Jan 1 21:36 .Trash
    -rw------- 1 al al 8421 Jan 2 17:56 .bash_history
    drwxr-xr-x 5 al al 170 Jan 28 2007 .file_store_32
    drwxr-xr-x 10 al al 340 Oct 26 08:25 .jagex_cache_32
    -rw-r--r-- 1 al al 534 Dec 28 07:47 .parallels_settings
    -rw------- 1 al al 99 Jun 8 2011 .profile
    -rw------- 1 root al 33 Jun 8 2011 .profile.save.1
    -rw------- 1 root al 54 Jun 8 2011 .profile.save.1.save
    -rw------- 1 root al 1 Jun 8 2011 .profile.save.1.save.save
    drwxrwx--- 28 al al 952 Jan 1 21:36 Desktop
    drwx------ 7 al al 238 Mar 5 2011 Documents
    drwxr-xr-x 2 al al 68 Dec 27 02:14 Incomplete
    drwx------ 34 al al 1156 Nov 17 02:12 Library
    drwx------ 3 al al 102 Sep 27 2006 Movies
    drwx------ 6 al al 204 Aug 2 2010 Music
    drwx------ 9 al al 306 Apr 4 2011 Pictures
    drwxr-xr-x 5 al al 170 Jun 15 2007 Public
    drwxr-xr-x 6 al al 204 Dec 29 2006 Sites

    ReplyDelete
  92. @water_adept, Great, it looks like you achieved your goal. By changing the ownership of the .profile file from the root user to the al user, you have eliminated the permission denied error. Now you just need to make sure that you have the full path to the SoyLatte JVM in the PATH variable that is defined in the .profile.

    ReplyDelete
  93. Hm, well I went back and looked, and echoed the path and this is what I get for path and java home

    dalems:~ al$ echo $PATH
    /Users/path/soylatte16-1.0.3/bin/:/bin:/sbin:/usr/bin:/usr/sbin
    dalems:~ al$ echo $JAVA_HOME
    /Users/path/soylatte16-1.0.3/

    However when I check the java version it still shows up as 1.5

    dalems:~ al$ java -version
    java version "1.5.0_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02-306)
    Java HotSpot(TM) Client VM (build 1.5.0_19-138, mix


    Now what must I do ? And I did close the terminal before trying the java version command

    Thanks for all the help so far

    ReplyDelete
  94. @water_adept, Please copy the contents of the .profile and paste it here so I can see what it contains.

    ReplyDelete
  95. From the text edit thing ? It's the same as I've noticed as two before, but still unsure about what to do about it afterwards as when I type in the 'export' command and whatnot it goes to the next line in terminal doing seemingly nothing to alter anything

    Anyways, this is what's in the .profile


    export PATH=/Users/path/soylatte16-1.0.3/bin/:$PATH
    export JAVA_HOME=/Users/path/soylatte16-1.0.3/

    ReplyDelete
  96. @water_adept, Well what you have in the .profile is correct. You have the path to the SoyLatte JVM before anything else, so that should be picked up but for some reason it's not.

    Please run the which command to show the java binary that is being found and executed in your environment:

    $ which java

    ReplyDelete
  97. This is it, I believe

    dalems:~ al$ which java
    /usr/bin/java

    ReplyDelete
  98. @water_adept, That tells me that the path to the SoyLatte JVM must not be correct. Double check that path to make sure it's correct. E.g., test it by doing this:

    $ ls /Users/path/soylatte16-1.0.3/bin/

    And see if it lists the contents of that directory or if give you an error.

    ReplyDelete
  99. Yup, it says there's no such file or directory


    Argh, it feels like it's on the edge of success !

    ReplyDelete
  100. @water_adept, Yes, you are very close. Just get that path correct, restart the Terminal, run your test again and you should be OK.

    ReplyDelete
  101. Well, I guess the problem now is that I don't know how to get the correct path, lol - Any ideas ?

    The video that was up seems to have been taken down so I've nothing really to go on except memory...which is bad enough !

    ReplyDelete
  102. @water_adept, Well, in which directory did you unzip the SoyLatte JVM? Just use Spotlight (cmd-space) to search your Mac for the word 'soylatte' (without the quotes). Is it in the Downloads directory just like the video demonstrated? a

    FWIW, I updated my blog post to point to the location of Robert's video.

    ReplyDelete
  103. I unzipped it on the desktop...I didn't have a downloads directory per se


    Well, I made a new a folder on the al user when you put in ls, and put soylatte in there just to make it easier on myself to just have to follow the video

    And well, I followed the video and did everything he did and everything worked just fine, changing the path to what he did and whatnot, however when I typed in java -version, it *still* showed up as 1.5

    Furthermore after closing the terminal and now re-opening it, it says -bash: ls: command not found

    When I try to type in ls or any other ls command

    Frustrations continue it seems !

    ReplyDelete
  104. @water_adept, I'm sorry that this has been so difficult for you. I wish I could just reach out and fix it for you because it would probably take me about five minutes.

    I'm guessing that the problem now is that the PATH has been defined incorrectly. What you need to do is edit the .profile to fix whatever is wrong with the PATH. To do this, follow these steps:

    1) Open TextEdit
    2) Go to File->Open
    3) While in the Open dialog box, type the following command: cmd-shift-. (that's the command key, the shift key and the period all at the same time). This will allow you to see files whose names begin with a dot.
    4) Now navigate to the al user's home directory to find the .profile
    5) Select the .profile
    6) Click the Open button

    Now edit the PATH to fix whatever is wrong, save it and restart the Terminal app. As long as the PATH has been fixed, you should be able to continue where you left off.

    ReplyDelete
  105. Sorry Bruce,

    A slight mistake on my behalf!

    I remember you saying that 'soylatte16-1.0.3' is Intel-based, so that's me out.

    But two lines down from the 1.0.3 release, there is this:

    32-bit OpenJDK 7 Beta 1 for Mac OS X 10.5 PowerPC (Beta Release): openjdk7-macppc-2009-12-16-b4.tar.bz2

    PPC? I do believe that's me!

    I deleted the 1.0.3 folder and tried the same two commands in the terminal, but I received the same response with second command.

    Any ideas?

    BR.

    Baz.

    ReplyDelete
  106. @Peter Tron, When you open the terminal, run the following command and let's see which Java binary is being found:

    $ which java

    Paste the results in a comment here.

    ReplyDelete
  107. Sorry Bruce,

    I tried that and got this:

    -bash: $: command not found

    I, of course, double-checked my spelling/spacing/higher/lower-case, so I copy/pasted it in. still the same msg.

    ReplyDelete
  108. @Peter Tron, Do not type the dollar sign. The dollar sign is the prompt in the terminal. Only type in the two words:

    which java

    ReplyDelete
    Replies
    1. Ah, at least this gives you an inkling as to what level I'm at!

      OK, this time I got a result:

      /usr/bin/java

      Delete
    2. Hi Bruce,

      you still there?

      Sorry, I understand if you're busy.

      Thanks for taking the time to help me out.

      Baz.

      Delete
    3. OK, it's finding the standard Java VM.

      Back to your original comment -- what I see two lines down from the 1.0.3 release is the following:

      32-bit OpenJDK 7 Beta 1 for Mac OS X 10.5 PowerPC (Beta Release): openjdk7-macppc-2009-12-16-b4.tar.bz2

      If you are using Mac OS X 10.5 on PowerPC then you can download this version if you would like to try out Java 7. Please note that it is a beta release which means that it is not an official release and could have many bugs in it.

      Regardless of which version you use, you will need to edit the PATH environment variable and add the fully path to the Java binary file. This is explained in the video that I linked to in the blog post. Here is the URL to the video again:

      Installing the JDK 1.6 on Mac OS X

      Be sure to follow the instructions in this video.

      Please note that after editing the PATH variable in the ~/.profile, you must open a new terminal.

      Delete
  109. I typed:

    open /Applications/TextEdit.app -/.profile

    I dbl checked, and it is typed exactly the way it was entered in the video.

    This is the response I received:

    open: invalid option -- /
    Usage: open [-e] [-t] [-f] [-W] [-n] [-g] [-h] [-b ] [-a ] [filenames]
    Help: Open opens files from a shell.
    By default, opens each file using the default application for that file.
    If the file is in the form of a URL, the file will be opened as a URL.
    Options:
    -a Opens with the specified application.
    -b Opens with the specified application bundle identifier.
    -e Opens with TextEdit.
    -t Opens with default text editor.
    -f Reads input from standard input and opens with TextEdit.
    -W, --wait-apps Blocks until the used applications are closed (even if they were already running).
    -n, --new Open a new instance of the application even if one is already running.
    -g, --background Does not bring the application to the foreground.
    -h, --header Searches header file locations for headers matching the given filenames, and opens them.

    ReplyDelete
  110. @Peter Tron, The problem is one of the characters in your path to the .profile. Instead of a hyphen (-), you need to use a tilde (~). Below is the correct path:

    open /Applications/TextEdit.app ~/.profile

    Please copy the path above and paste it into the terminal.

    ReplyDelete
  111. Aha, I was having trouble with the resolution of the video.

    A result, of sorts:

    The file /Users/admin/.profile does not exist.

    So, after reading some of your responses in the previous comments, it appears I need to create a .profile.

    Open:
    TextEdit/new/.save as/.profile?

    I realize to save a doc. with a dot at the beginning means I will not be able to see it.

    Where shall I save it to?

    ReplyDelete
  112. I really don't understand anything... When you open your bin in the video file you get some kind of Matrix pop up, but I don't seem to have that. Can't get past that point. Could you please help, I'm very sorry for being so dumb, but I really need 1.6 on my Mac!
    Kind regards!

    ReplyDelete
  113. @Michael V. That Matrix pop-up is a customized look for Terminal - a utility you'll find in the Utilities folder in your Applications - not something in the bin folder. Your Terminal will likely be a blank white slate with a command prompt at the top. Be careful messing around with it because you could damage a great deal more than your Java settings with this tool.

    By the way @Bruce Snyder this post and all the comments have been incredibly helpful. They haven't solved my problem, but they've helped me understand it much better. I'm grateful for your patience and clear instructions.

    ReplyDelete
  114. Hello Bruce,

    Thanks for helping so many people (I'm not sure why soylatte doesn't include better instructions). Anyway, I am having trouble with this on os x 10.5.8.

    I added soylatte to the PATH in .profile, but java -version is still 1.5. I also change added JAVA_HOME in .profile to soylatte, but now java -version returns the following,

    Error: could not find libjava.dylib
    Error: could not find Java 2 Runtime Environment.

    I found this post about the error, but I'm not savvy enough to apply the advice to soylatte.

    Any help would be appreciated,

    Jarrod

    ReplyDelete
    Replies
    1. Forgot to include that link!
      http://lists.apple.com/archives/java-dev/2009/Jun/msg00139.html

      Delete
    2. Hi Jarrod, please echo your $PATH variable and paste the result here so I can take a look at it. I'm guessing that the $PATH is still pointing at Java 1.5 and the $JAVA_HOME is pointing at Java 1.6. I'm not sure but the seeing the contents of the $PATH may help.

      Delete