This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
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.)
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.)
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.
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
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.
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:
2) Hit return. Now go to your JavaVM framework by typing:
3) Hit return. Next, get a "long" list of this directory by typing (note this is a lowercase letter 'L' -- not a number "1"):
4) Hit return. Now change to the Versions directory by typing:
5) Hit return. Next, get a "long" list of this directory by typing:
6) Hit return. Copy your complete Terminal output and post it here. For example, mine looks like this:
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.
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 ]
(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.)