java hangs after installing "Java for Mac OS X 10.5 Update 4" (1.0)

After getting this update shoved in, java (launched from the command line) wouldn't start anymore, and it seems to have entered an infinite loop, taking up the CPU usage.

I have captured a sample of the process that I could provide for analyze if needed. You can find a copy at http://www.greencirclestore.com/javahanging_onleopard.html.

MacBook, Mac OS X (10.5.7)

Posted on Jun 26, 2009 10:10 PM

Reply
9 replies

Jun 29, 2009 3:28 AM in response to xnav

Thanks for the suggestions !

I tried changing the preferred version ordering for Java applications in JavaPreferences with no apparent improvement (I bumped to the top each of J2SE5.0 32bit, Java SE 664bit, J2SE5.0 64bit, J2SE1.4.2 32bit options).

Console doesn't show any new messages following the launch of "java -version" from the command line.

Jun 29, 2009 7:16 AM in response to bhapca

I'm afraid you're just one of numerous people to have problems with this release.

The Java Dev mailing list has many posts about the new Java version - which should never have been released in the first place.

Anyone who hasn't yet updated Java - DON'T!

Sadly I don't know any easy way to back track to a prior Java version short of complete reinstallation, but that would probably be your best option if you're desperate for Java to work.

Bob

Jun 29, 2009 8:09 AM in response to Bob Lang1

I think I found a workaround for this issue (and found some other bugs while doing it - but at least it puts this behind me).

First I discovered that it affects only the command line, the applets work fine, as reported by http://www.javatester.org/version.html.

I had been changing the preferred version of Java using "Java Preferences" and while the changes seem to take effect for applets, it didn't change the behavior of the command line java.

So I did a "which java". Then I followed the symlinks with "ls -l" all the way to the actual file.

It seems that we have several versions of Java under /System/Library/Frameworks/JavaVM.framework/Versions, and the current version, as seen by the system, is dictated by /System/Library/Frameworks/JavaVM.framework/Versions/Current. Now this was pointing to the folder "A". That didn't seem right (not a recognizable version number). All I had to do was to re-link to a valid version like so:

cd /System/Library/Frameworks/JavaVM.framework/Versions
sudo mv Current Current_old
sudo ln -s 1.5 Current

and now Java works ! (you could pick other versions than 1.5, I tried 1.4.2 and that works too)

So there are 2 issues open for Apple:

1. what's up with that "A" version ? - it seems to be different than all others which sound legit (e.g. the size of java executable differs) and why's that the default "current" version

2. why changing the preferred version through "Java Preferences" has no effect ? - it launches the same executable image (perhaps it should do the relinking I had to do manually as explained above)

All in all, java seems to be working now, after all these contortions.

Jun 29, 2009 1:26 PM in response to bhapca

Bad news, the fix with re-linking, while fixing the command line issues, breaks the applet functionality and the "Java Preferences" utility. Go figure !

So please DON'T DO IT ! If you already did, you can roll back with:

sudo mv Current Current_new
sudo mv Current_old Current

I'm sorry for this misguided attempt at fixing this issue.

Jun 30, 2009 9:53 AM in response to xnav

Thanks for the info. Probably my A folder is corrupted. Below is what ls shows me. That can't be right. Almost all files there have 68736 bytes.

macbook:Commands bhapca$ pwd
/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands
macbook:Commands bhapca$ ls -l
total 4760
-rwxr-xr-x 1 root wheel 68752 26 May 00:14 appletviewer
-rwxr-xr-x 1 root wheel 68736 26 May 00:14 apt
-rwxr-xr-x 1 root wheel 68736 26 May 00:14 extcheck
-rwxr-xr-x 1 root wheel 68736 26 May 00:14 idlj
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jar
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jarsigner
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 java
-rwxr-xr-x 1 root wheel 77408 26 May 00:16 java_home
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 javac
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 javadoc
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 javah
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 javap
-rwxr-xr-x 1 root wheel 59952 26 May 00:16 javaws
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jconsole
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jdb
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jhat
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jinfo
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jmap
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jps
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jsadebugd
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jstack
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jstat
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 jstatd
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 keytool
-rwxr-xr-x 1 root wheel 68752 26 May 00:15 native2ascii
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 orbd
-rwxr-xr-x 1 root wheel 68736 26 May 00:15 pack200
-rwxr-xr-x 1 root wheel 68752 26 May 00:15 policytool
-rwxr-xr-x 1 root wheel 68736 26 May 00:16 rmic
-rwxr-xr-x 1 root wheel 68736 26 May 00:16 rmid
-rwxr-xr-x 1 root wheel 68752 26 May 00:16 rmiregistry
-rwxr-xr-x 1 root wheel 68736 26 May 00:16 serialver
-rwxr-xr-x 1 root wheel 68752 26 May 00:16 servertool
-rwxr-xr-x 1 root wheel 68736 26 May 00:16 tnameserv
-rwxr-xr-x 1 root wheel 68736 26 May 00:16 unpack200

macbook:Commands bhapca$ stat -x java
File: "java"
Size: 68736 FileType: Regular File
Mode: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ wheel)
Device: 14,2 Inode: 2920912 Links: 1
Access: Mon Jun 29 23:47:11 2009
Modify: Tue May 26 00:15:07 2009
Change: Thu Jun 25 07:09:48 2009

Jun 30, 2009 11:13 AM in response to bhapca

Mine:

Path:/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands$ls -l
total 4760
drwxr-xr-x 37 root wheel 1258 Jun 22 05:19 ./
drwxr-xr-x 8 root wheel 272 Jun 22 05:19 ../
-rwxr-xr-x 1 root wheel 68752 May 25 11:14 appletviewer
-rwxr-xr-x 1 root wheel 68736 May 25 11:14 apt
-rwxr-xr-x 1 root wheel 68736 May 25 11:14 extcheck
-rwxr-xr-x 1 root wheel 68736 May 25 11:14 idlj
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jar
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jarsigner
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 java
-rwxr-xr-x 1 root wheel 77408 May 25 11:16 java_home
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 javac
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 javadoc
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 javah
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 javap
-rwxr-xr-x 1 root wheel 59952 May 25 11:16 javaws
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jconsole
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jdb
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jhat
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jinfo
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jmap
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jps
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jsadebugd
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jstack
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jstat
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 jstatd
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 keytool
-rwxr-xr-x 1 root wheel 68752 May 25 11:15 native2ascii
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 orbd
-rwxr-xr-x 1 root wheel 68736 May 25 11:15 pack200
-rwxr-xr-x 1 root wheel 68752 May 25 11:15 policytool
-rwxr-xr-x 1 root wheel 68736 May 25 11:16 rmic
-rwxr-xr-x 1 root wheel 68736 May 25 11:16 rmid
-rwxr-xr-x 1 root wheel 68752 May 25 11:16 rmiregistry
-rwxr-xr-x 1 root wheel 68736 May 25 11:16 serialver
-rwxr-xr-x 1 root wheel 68752 May 25 11:16 servertool
-rwxr-xr-x 1 root wheel 68736 May 25 11:16 tnameserv
-rwxr-xr-x 1 root wheel 68736 May 25 11:16 unpack200
Path:/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands$stat -x java
File: "java"
Size: 68736 FileType: Regular File
Mode: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ wheel)
Device: 14,2 Inode: 16454998 Links: 1
Access: Sun Jun 28 12:15:18 2009
Modify: Mon May 25 11:15:07 2009
Change: Mon Jun 22 05:19:33 2009

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

java hangs after installing "Java for Mac OS X 10.5 Update 4" (1.0)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.