Tiger: Java segmentation fault

Discussion in 'macOS' started by DaiKirai, May 3, 2005.

  1. DaiKirai macrumors member

    Joined:
    Jan 17, 2005
    #1
    Okay, I formatted my HD and installed Tiger from scratch yesterday. With my new install, Cyberduck and other Java apps won't open (they bounce a few times and quit again) and I seem to be having the same problem with Java that 10.3.9 users were.

    Kisaragi:~/Documents/Interactive Fiction root# java -version
    Segmentation fault

    Unfortunately it seems I can't install the 10.3.9 Java update on Tiger, and the Java 5.0 thing didn't fix my problem. Anyone know a solution to this problem that works under Tiger?
     
  2. MauiBoy macrumors member

    Joined:
    Sep 7, 2005
    #2
    Same issue in 10.4.5

    I've got the same issue after updating from 10.4.4 to 10.4.5. Java worked fine before this. After the update, I get segmentation faults any time I try to run any of the Java utilities.

    The system maps Java 1.4.2 as the default, and this is the one causing problems. Java 1.3.1 and 1.5.0 are also installed with the system, and if I run the utilities from these directories, things work fine. Now, if I could figure out how to set the system default to 1.5.0 instead of 1.4.2.

    I also run into other problems when compiling large Java projects in OS X. I get OutOfMemoryError exceptions. Don't know how that's possible, given that I try to compile after a fresh restart (nothing significant running). I have 1GB RAM in my PowerBook G4.

    Any solutions to the Java segmentation fault problem? I use 1.4.2 for work projects on a daily basis, and I'd really like to get this fixed. The workarounds for the SAME PROBLEM in 10.3.9 do not work. Running "java -Xdump" just segfaults again.
     
  3. VanNess macrumors 6502a

    VanNess

    Joined:
    Mar 31, 2005
    Location:
    California
    #3
    In your utilities folder, open the Java folder, then the J2SE 5.0 folder, and open the Java Preferences app inside. Select the general tab, and for "use version:" select J2SE 5.0. and in the Java Application runtime settings box, make sure J2SE 5.0 is at the top. If not, drag it there. Close it up and you're done.
     
  4. MauiBoy macrumors member

    Joined:
    Sep 7, 2005
    #4
    Thanks for the suggestion -- I'll do that for now. Is there any way to restore 1.4.2 to working order, though? There are quite a few differences in the 1.5.0 Java API, and some of the programs I use will not compile with 1.5.0 yet. For example, 1.5 introduces the keyword "enum", which was not present in past releases. Some of these programs created their own enum, called "enum"; therefore, they won't compile.
     
  5. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #5
    Have you tried downloading java 1.4.2 from the apple developer site?
     
  6. MauiBoy macrumors member

    Joined:
    Sep 7, 2005
    #6
    Unfortunately, the only Java 1.4.2 that I can find on the ADC is the 1.4.2 Update 1 Developer Tools for Panther. There's nothing for Tiger. :(

    I am downloading the latest Developer Tools 2.2.1 for Tiger, to see if that contains the Java 1.4 Developer Tools. 900MB...dang. :eek:
     
  7. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #7
  8. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #8
    The 1.5 install leaves the 1.4.x install in place. You can find the (1.4.2) java commands in /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Commands
     
  9. VanNess macrumors 6502a

    VanNess

    Joined:
    Mar 31, 2005
    Location:
    California
    #9
    I've been running 1.5 for awhile now (as system default) and haven't had a problem with it, at least none that I'm aware of. I haven't had the segmentation error being reported in this thread, but my java use is light and mostly embedded java stuff on the web when it shows up. I'm not a programmer so I couldn't help you there. I remember getting java errors at the tail end of Panther's update cycle, but I remember that was corrected rather quickly by Apple in a subsequent update pertaining to Java.

    The only way I know of to "restore" 1.4.2 would be to clean install the system, then apply the usual updaters taking you to the last version of 1.4.2 (and forgo 1.5 if posiible). There isn't a java uninstall that I'm aware of, and reapplying the java updates are refused by the installer if an up-to-date installation of java already exists on your system, IIRC. In any event, going the clean install route is no guarantee that 1.4.2 would be restored - as in working. You know your system better than I if it's worth the effort.
     
  10. MauiBoy macrumors member

    Joined:
    Sep 7, 2005
    #10
    Well, neither the installation of Xcode 2.2.1 nor the re-install of the Java 1.3.1/1.4.2 Update 2 solved the problem, unfortunately. In addition, changing the default Java version in the Java 1.5.0 Preferences under Applications->Utilities->Java->J2SE 5.0->Java Preferences did not change the command-line symbolic links. The links still point to 1.4.2_09. :(

    Any other suggestions (aside from wiping out and reinstalling OS X)? :confused:
     
  11. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #11
    MB, you are sending mixed messages...First you ask how to go back to 1.4.2 and now you are asking how to make the commands point at 1.5

    http://forums.macrumors.com/showthread.php?t=170879
     
  12. MauiBoy macrumors member

    Joined:
    Sep 7, 2005
    #12
    Sorry for the confusion. What I'd like is to restore 1.4.2 to working order. I need 1.4.2 for my job.

    Barring that, I'd like to get 1.5.0 working in its place. Thanks for the tip about 1.5.0; I can definitely alias the commands in bash. I just wondered if there was an "Apple-way" of setting up all these symbolic links to one version or the other (e.g., a System Prefs pane or something). If not, I can hack the underlying UN*X symbolic links to work the way I need. Still doesn't get 1.4.2 working, though. I guess I'll just have to do a clean install to get 1.4.2 back. :(

    I'm amazed that no one else has had this problem here (or, maybe no one uses the command-line versions of java much). I have no haxies or other system changes on my computer; it's a pretty standard setup.
     
  13. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #13
    I frequently use the command line version of java 1.4.2 and java 1.5.0.

    My system was installed by performing a fresh install of Tiger 10.4.0, followed by the system updates as they were released. Java has been installed by downloading the install package for 1.4.2 and by installing each of the developer previews for java 1.5.0.

    Installs of Developer tools have also been done on this system. I am in the habit of using the developer tools uninstaller (found on the developer tools CD, and in /Developer/Tools/uninstall-devtools.pl) to remove developer tools before installing a new version. It is possible that this uninstaller followed by a fresh install of the developer tools might help resolve your Java issues.
     
  14. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #14
    I am still confused. You said earlier the link is pointing at 1.4.2_09.

    Right now all of my java commands (in /usr/bin) are symbolic links - changing them isn't really a hack.

    Code:
    lrwxr-xr-x   1 root  wheel     77 Sep 14 23:33 javaws -> /Applications/Utilities/Java/Java Web Start.app/Contents/MacOS/Java Web Start
    lrwxr-xr-x   1 root  wheel     58 Sep 14 23:33 javap -> /System/Library/Frameworks/JavaVM.framework/Commands/javap
    lrwxr-xr-x   1 root  wheel     58 Sep 14 23:33 javah -> /System/Library/Frameworks/JavaVM.framework/Commands/javah
    lrwxr-xr-x   1 root  wheel     60 Sep 14 23:33 javadoc -> /System/Library/Frameworks/JavaVM.framework/Commands/javadoc
    lrwxr-xr-x   1 root  wheel     58 Sep 14 23:33 javac -> /System/Library/Frameworks/JavaVM.framework/Commands/javac
    lrwxr-xr-x   1 root  wheel     65 Sep 14 23:33 java-rmi.cgi -> /System/Library/Frameworks/JavaVM.framework/Commands/java-rmi.cgi
    lrwxr-xr-x   1 root  wheel     57 Sep 14 23:33 java -> /System/Library/Frameworks/JavaVM.framework/Commands/java
    -r-xr-xr-x   1 root  wheel  51048 Nov  1 16:24 javaconfig
    -r-xr-xr-x   1 root  wheel  68268 Nov  1 16:25 javatool
    
    Whats also confusing is that Java 1.5 doesn't touch the commands in /usr/bin, the post I referenced shows you how to create symlinks to the 1.5 java commands. I'm guessing some user of your machine changed them.

    Now with all that said, you can create your own (or modify existing) symlinks to point at the appropriate version, keep in mind that should any shell scripts or other processes rely on this command, you could cause issues. You can find all the different versions in /System/Library/Frameworks/JavaVM.framework/Versions

    Here's a listing from my mini
    Code:
    miniweb:/System/Library/Frameworks/JavaVM.framework/Versions jeremy$ ls -ltr
    total 40
    drwxr-xr-x   8 root  wheel  272 Jul 16  2005 1.4.2
    drwxr-xr-x   8 root  wheel  272 Jul 16  2005 1.3.1
    lrwxr-xr-x   1 root  wheel    5 Sep 14 23:33 1.4 -> 1.4.2
    lrwxr-xr-x   1 root  wheel    5 Sep 14 23:33 CurrentJDK -> 1.4.2
    lrwxr-xr-x   1 root  wheel    5 Nov 15 21:24 1.3 -> 1.3.1
    lrwxr-xr-x   1 root  wheel    5 Nov 15 21:24 1.5 -> 1.5.0
    drwxr-xr-x   8 root  wheel  272 Nov 15 21:24 1.5.0
    lrwxr-xr-x   1 root  wheel    1 Nov 15 21:24 Current -> A
    drwxr-xr-x   6 root  wheel  204 Mar  2 19:18 A
    
     

Share This Page