• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

none of my java applications work with 1.5.0 on mac os 10.3.9

 
Ranch Hand
Posts: 77
Python C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
none of the applications that are java run work anymore. how do I make it work or how do I get 1.4 back?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not much to go on. Everything works fine for me.
 
Zachary Davis
Ranch Hand
Posts: 77
Python C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oh this is the error I get
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been watching this thread hoping that someone else would respond, because I would just be guessing. Maybe more information would help.

When you say "none" of your Java apps work, does this mean all Java, including a "Hello world" program? Or are we just talking about third-party apps? If it's third-party apps, then are the error messages all idential with these specific jnilib references? (Note: "jnilib" is a Java native interface library, which allows Java to access native Mac resources.)

Question for Mac experts: Is it unusual for the path listed here to end in a "stub"? That is, ".../Tribal Trouble.app/Contents/MacOS/JavaApplicationStub"? I suspect this is just a look inside normal "app" packaging, but I don't know. EDIT: I found an answer. When a Java program is bundled as a Mac app, the JavaApplicationStub is native code that launches the program.

Now, as for going back to Java 1.4: All you really did to get Java 1.5 was add the files (leaving all the 1.4 files in place) and then modify the "CurrentJDK" alias to point to the 1.5 version, right? So you should be able to follow the same basic steps for modifying the "CurrentJDK" alias to point back to 1.4.
[ September 06, 2006: Message edited by: marc weber ]
 
Zachary Davis
Ranch Hand
Posts: 77
Python C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well i dont know if "hello world" works, because net beans gives this error as well
(Tribal Trouble is a Java powered game)
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Davis:
well i dont know if "hello world" works, because net beans gives this error as well
(Tribal Trouble is a Java powered game)


NetBeans is itself a Java app, so that makes sense. But are all the errors "...libawt.jnilib undefined reference..."? This looks isolated to a native rendering (awt) issue. I wonder if this reveals an incompatibility between Java 1.5 and Mac OS 10.3. That is, are the newer Java libraries trying to call native code that doesn't exist in 10.3?

(I just installed "Titan Attacks" from the same vendor. Good stuff -- especially for those of us who never got past the "Space Invaders" era.)
 
Zachary Davis
Ranch Hand
Posts: 77
Python C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If i were to remove all the 1.5 java files and installed the 1.4.2 update (from apple) again would i have java back and would that be my easiest option?
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Davis:
If i were to remove all the 1.5 java files and installed the 1.4.2 update (from apple) again would i have java back and would that be my easiest option?


Aren't your 1.4 files still there? I would think the easiest option would be to change the CurrentJDK alias to point back to the 1.4 version. You shouldn't need to remove the 1.5 files or reinstall anything.

(If it turns out that Java 1.5 actually does have a problem with OS 10.3, then you will probably want to remove them, but I don't think we've established that for sure yet.)
 
Zachary Davis
Ranch Hand
Posts: 77
Python C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how do I change it to point to 1.4.2 agian?( I tried this)
 
marc weber
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to change to the correct directory first. Here are the steps (with 1.4.2 put back in place of 1.5.0)...
  • Open Terminal.
  • Identify yourself as the administrator by typing: sudo su root
  • Terminal will prompt for the admin password. Enter this.
  • Change the current directory by typing: cd /System/Library/Frameworks/JavaVM.framework/Versions
  • Within this directory, there is an alias called CurrentJDK pointing to the "current" version of Java. You need to remove this alias by typing: rm CurrentJDK
  • Now you need to replace it with a new alias pointing to the 1.4.2 directory instead. Do this by typing: ln �s 1.4.2 CurrentJDK
  • Finally, log out of the session as administrator by typing: exit
  •  
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    great now the apps powered by java bounce once and go away... ... .. ... .. I think the easiest way to rid the whole situation is to save what I need and reinstall because I cant live without Java.
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by John Davis:
    great now the apps powered by java bounce once and go away...


    Actually, it's fairly common for Java apps from that vendor (Puppy Games) to crash when launching. I don't know why. Usually they open fine on the next try.

    Do these ever open okay? Or do they crash every time?
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    i think they crash all the time ill try when im done with school
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    net beans and tribal trouble dont work they look like their on a trampoline for a few seconds
    and they do it every time
    [ September 05, 2006: Message edited by: John Davis ]
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by John Davis:
    net beans and tribal trouble dont work they look like their on a trampoline for a few seconds
    and they do it every time...


    I'm still curious why 1.5 isn't working, but if the goal now is to get 1.4.2 back again, then I guess I would try the re-install.

    I'm assuming these apps worked using 1.4.2, right?
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    yeah they worked until I tried for 1.5.0 it's so weird that it works on other poeples 10.3.9 system. is there a way to get the computer to say whats missing?

    hey if I use that Pacifist(it opens the packeges and lets you choose what you want) and get the system folder should it work(I'll most likely back it up anyway,but maybe after more disscution
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Looking into this, I ran across a January 2006 blog entry pertaining to the JavaApplicationStub. I thought the following looked interesting...

    Just recently, after updating to QuickTime 7.0.4 on Mac OS X 10.3.9, certain old stub files refused to launch Java applications any more (the fix is easy: just copy a current stub file from /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/ to your affected application bundles).


    So my guess -- and it's not much more than that -- is that replacing your JavaApplicationStubs in the problem apps might solve the problem.

    A Mac app is basically a "package." If you Control+click (or right-click) on an app, one option should be to "Show Package Contents." For Java apps, it looks like there will be a MacOS folder in the app that contains a JavaApplicationStub.

    So pick a Java app that's not launching, and find its JavaApplicationStub (as described above). In theory, this is a "bad" one. Make a copy of this JavaApplicationStub as a back-up, and put it somewhere like your desktop.

    Go to /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/ and copy the item JavaApplicationStub. In theory, this is a "good" one. Go back to the "broken" app's MacOS folder, and replace the app's JavaApplicationStub (the one you backed up earlier) with the one you just copied.

    Now try launching the app. If it works, then I think you've found the problem.
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    all i get is a window that says "you can not open the app. Netbeans because it may be damaged or incomplete"
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I'm tring to find out if tribal trouble is reinstalable (at there forum im macman this is the topicso we have lots of time to try other stuff but theres not much more just if you think of something let me know
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by John Davis:
    all i get is a window that says "you can not open the app. Netbeans because it may be damaged or incomplete"


    Okay, if that happened after you tried replacing the JavaApplicationStub, then you should put the original JavaApplicationStub back (the back-up copy), and try a re-install of Java instead. I wouldn't mess with the Tribal Trouble app at this point.
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    whats the easiest way to reinstall java?
    [ September 06, 2006: Message edited by: John Davis ]
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    When you copied the 1.5.0 files over, did you leave all of the 1.4.2 files as they were? I expect these are all still fine, so what you really need is to get your frameworks configured back to work with 1.4.2. So let's see what your framework looks like. Follow these steps...

    1) Open Terminal and display the contents of your .bash_profile by typing:

    cat .bash_profile

    2) Hit return. Now go to your JavaVM framework by typing:

    cd /System/Library/Frameworks/JavaVM.framework

    3) Hit return. Next, get a "long" list of this directory by typing (note this is a lowercase letter 'L' -- not a number "1"):

    ls -l

    4) Hit return. Now change to the Versions directory by typing:

    cd Versions

    5) Hit return. Next, get a "long" list of this directory by typing:

    ls -l

    6) Hit return. Copy your complete Terminal output and post it here. For example, mine looks like this:
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    the first ls (LS) was the same as yours, but the second looks like this



    I guess this points to java 1.5.0 still I put those files in and get this




    the old one had the currentJDK icon as a white sheet but the new one is a folder
    I still get an error
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Follow these steps exactly (don't skip anything or improvise) to replace your CurrentJDK alias...
  • Open Terminal.
  • Identify yourself as the administrator by typing: sudo su root
  • Terminal will prompt for the admin password. Enter this.
  • Change the current directory by typing: cd /System/Library/Frameworks/JavaVM.framework/Versions
  • Within this directory, there is an alias called CurrentJDK pointing to version 1.5.0. You need to remove this alias by typing: rm CurrentJDK
  • Now you need to replace it with a new alias pointing to the 1.4.2 directory instead. Do this by typing: ln �s 1.4.2 CurrentJDK
  • Finally, log out of the session as administrator by typing: exit
  • After doing this, close Terminal. Then re-launch Terminal and get a new listing of your framework, and post it here.
    [ September 06, 2006: Message edited by: marc weber ]
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I did this

    then this
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    IT WORKS!!!
    I could hear the hallelujah chorus in my head!
    will this work with 1.5.0?
    thanks alot Marc Weber
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Originally posted by John Davis:
    ...will this work with 1.5.0? ...


    I don't know. I thought that with CurrentJDK pointing to the 1.5.0 directory, it would work okay, but there seemed to be problems with that.

    I really don't know enough about Unix file permissions to say whether this would make a difference, but I see that your 1.5.0 directory has "zach" as the owner and "admin" as the group (instead of "root" as the owner and "wheel" as the group).

    Hopefully, a Unix expert can tell us whether that might make a difference.
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    my dad knows alot about unix, but he's c++
    i'll ask him
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    also netbeans still bounces then stops(I reinstalled netbbeans)
    we're close I know
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Before reinstalling, did you first remove the existing NetBeans and empty the Trash?
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I didn't empty it but it still does not work after I fixed it (sorry I didn't reply as fast as I usually do)
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Could you post the complete error report you get when it crashes?
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I got this from console
    thats all it said
    [ September 07, 2006: Message edited by: John Davis ]
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hmmm... This is a guess, but open Terminal and display the contents of your .bash_profile by typing:

    cat .bash_profile

    Copy your entire Terminal output and post it here.
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    my dad says the unix command to change owner and group is



    you can find more about it by typing this in terminal



    this had no affact on netbeans

    and I did what you said above and got this

     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Yes, chown and chgrp are the commands, BUT...
  • If you're doing this to a directory, then you need to make sure you use the recursive option so that the changes apply to everything under that directory as well.
  • The real question is whether this would have any effect when CurrentJDK is pointing to the 1.5.0 directory. In other words, might this be what prevented 1.5.0 from working with your apps? Changing the owner and/or group would have no effect unless you're trying to go back to 1.5.0.
  • Unix commands are powerful, but unforgiving -- there's no "undo" or "trash" to recover. So be very careful playing with this.
  • As indicated by your .bash_profile, I think the real problem with NetBeans is that your JAVA_HOME variable is still pointing to 1.5.0 (while I assume that your CurrentJDK is pointing to 1.4.2). Here's how you change it...

    When you open Terminal, its working folder should be your home folder, which is where your .bash_profile should be. Use the following command to open the file in TextEdit...

    open /Applications/TextEdit.app .bash_profile

    In TextEdit, change the 1.5.0 in the first line to 1.4.2...

    Save the file in TextEdit, then make sure the file has the proper permissions by entering the following in Terminal...

    chmod a+x .bash_profile
    [ September 09, 2006: Message edited by: marc weber ]
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    (If this does not solve the problem, then go back up to my previous post where I said, "...let's see what your framework looks like. Follow these steps..." Follow those 6 steps completely, so that we can get an accurate picture of your configuration.)
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    ok here it is
     
    marc weber
    Sheriff
    Posts: 11343
    Mac Safari Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    The .bash_profile should read...

    ...without the "Zachary-Davis-Computer:~ zach$" at the end of the JAVA_HOME variable. (I wasn't careful with my copy/paste above.)

    Try editing again.
     
    Zachary Davis
    Ranch Hand
    Posts: 77
    Python C++ Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    ok, sorry it took me so long (school is time consuming more then usual of late)
    I got this
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic