installing Java 5.0 on OS X Tiger

S

spwpreston

Hello All,

I recently upgraded to OS X 10.4.3, then 'tried' upgrading to Java
5.0(1.5). When I type "java -version" at the Terminal prompt, it tells
me I am still running 1.4.2. What is going on? Do I need to fiddle with
the location of this new Java version?

thank you much.
S. Borg
 
M

Mickey Segal

I recently upgraded to OS X 10.4.3, then 'tried' upgrading to Java
5.0(1.5). When I type "java -version" at the Terminal prompt, it tells
me I am still running 1.4.2. What is going on? Do I need to fiddle with
the location of this new Java version?

Java 1.4 remains on your computer in addition to 1.5. You can set which of
the two is active using the Java Preferences utility.
 
R

Roedy Green

I recently upgraded to OS X 10.4.3, then 'tried' upgrading to Java
5.0(1.5). When I type "java -version" at the Terminal prompt, it tells
me I am still running 1.4.2. What is going on? Do I need to fiddle with
the location of this new Java version?

I have found unless you uninstall the old version first, and purge
the registry and files of the old Java, you get cross-errors like
this.
 
A

Andrew Thompson

Roedy said:
I have found unless you uninstall the old version first, and purge
the registry and files of the old Java, you get cross-errors like
this.

Whereas your advice might apply to Windows, I suspect
Mickey identified the problem here. [ And I would not
recommend to the OP that they attempt to unistall 1.4
from OS X. ]
 
G

Googmeister

Mickey said:
Java 1.4 remains on your computer in addition to 1.5. You can set which of
the two is active using the Java Preferences utility.

In my experience, this only changes the Java version for
applets, applets, and applications launched from the GUI.
For compiling/executing from the Terminal, I added the
following alias to my .tcshrc file.

alias javac
'/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/javac'
alias java
'/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java'

If you use the bash shell do the following instead,

alias
javac='/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/javac'
alias
java='/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Commands/java'
 
S

Steve W. Jackson

Andrew Thompson said:
Roedy said:
I have found unless you uninstall the old version first, and purge
the registry and files of the old Java, you get cross-errors like
this.

Whereas your advice might apply to Windows, I suspect
Mickey identified the problem here. [ And I would not
recommend to the OP that they attempt to unistall 1.4
from OS X. ]

I second Andrew's response. Mac OS X has no "registry".

I have downloaded, but not yet installed, the new Java 5.0 from Apple.
In a shell, the "java" and "javac" commands are both located in
/usr/bin, and both are symbolic links to equivalently named files in the
/System/Library/Frameworks/JavaVM.framework/Commands directory.
Commands, like most of the other items in the JavaVM.framework
directory, is a symbolic link to something else. It's Apple's
complicated way of switching between "current" versions, by switching
what symbolic links point to.

Once I get around to installing the new release, I'll check to see
what's changed, but I suspect it will change nothing unless I manually
adjust those links (which I'm not likely to attempt) or use the utility
Apple refers to.

= Steve =
 
S

Shin

I am getting similar results when using the preference setting tool
under /Application/Utilities/Java/java5.0/

-Shin
 
S

Scott Ellsworth

Hello All,

I recently upgraded to OS X 10.4.3, then 'tried' upgrading to Java
5.0(1.5). When I type "java -version" at the Terminal prompt, it tells
me I am still running 1.4.2. What is going on? Do I need to fiddle with
the location of this new Java version?

I suspect that your install is fine, but that you need to tell your
system to use it.

Apple wants more testing before 1.5 becomes the default. From where I
sit, it is better than 1.4 for all of my apps, but I am willing to
accept that they have a reasonably good reason for this behavior for
now. They, after all, are the ones who will be in worlds of hurt if it
works poorly.

To get 1.5 to be the default for the command line, add the following to
your .profile:

export
PATH="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin:$
{PATH}"

To get 1.5 to be the default for applets and applications, use the java
preference utility in /Applications/Utilities/Java 1.5

Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top