Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Java 1.6 Status on Apple
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Java 1.6 Status on Apple



Oscar Appelgren wrote:

>Running Java Preference did not make 1.5 default for me, I had to do
>that by hand sym-linking.

Actually, you didn't, and when you did, it broke things for you, as you
reported in your original post.

In your case, a bundled Swing app, Xcode was quite capable of handling 1.5
without you changing sym-links by hand.  In fact, changing symlinks by hand
caused Xcode to break, complaining about a missing piece it wanted.


One problem you did have was that the instructions weren't very clear
regarding the Executable target options.  Fixing that did not require
changing symlinks by hand, though, except to undo the change you'd made.
  <http://lists.apple.com/archives/java-dev/2005/Aug/msg00473.html>
  <http://lists.apple.com/archives/java-dev/2005/Aug/msg00447.html>


As to a 'java' command in Terminal, there are several ways to get that to
refer to 1.5 without changing symlinks in JavaVM.framework:
  1) a shell command-alias:
     alias java '/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java'

  2) changing the PATH env-var to search 1.5/Commands/ before searching
/usr/bin.  This has the added feature of redirecting ALL Java-related
commands, such as javac and javap, to the 1.5 versions.

  3) creating a ~/bin directory with your own symlinks in it, such as
'java15' symlinked to the 1.5/Commands/java, then adding "$HOME/bin" at the
front of your PATH.

Any of these are safer than changing JavaVM.framework's symlinks.  The
latter two are even easier than changing symlinks, because you don't need
admin privileges, nor do you need to write shell startup scripts with
multiple 'alias' commands:
  <http://developer.apple.com/qa/qa2001/qa1067.html>

  -- GG



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.