Resolved JavaVM and Arduino IDE problem.

alex5230

macrumors newbie
Original poster
Sep 10, 2018
7
1
Sicily, Italy
Hi!

I just installed java 1.6 and 1.7 thanks to the files provided by @JoyBed but things are not working entirely.
I'm using a PowerMac G4 QS on Leopard 10.5.8.
I can switch between Java 1.6 and 1.7 without any problem, but if I try to revert back to Leopard Java 1.5 I get the following error in the Terminal:

Failed to open library /System/Library/Frameworks/JavaVM.framework/JavaVM
Failed to find scheduleUpdateSharing in JavaVM library: invalid handle passed to dlsym()
/Volumes/Archivio RAID 1/Software Mac/Java6_ppc/Java Updater/Switch to Java 5.sh: line 12: 551 Bus error java -version

Not that bad I tought, I want to use 1.6 anyway and that should work.
Then I tried to run the Arduino IDE 1.0.6, but the app is bouncing and then crashing. I did a little of troubleshooting and this is what the terminal returns when trying to run the program:

sh-3.2# /Volumes/Archivio\ RAID\ 1/Software\ Mac/Arduino.app/Contents/MacOS/JavaApplicationStub
Failed to open library /System/Library/Frameworks/JavaVM.framework/JavaVM
Failed to find scheduleUpdateSharing in JavaVM library: invalid handle passed to dlsym()
Bus error

(tried without su gives the same results).

So, what's the problem with the JavaVM library? I did something wrong?
 

z970mp

macrumors 68030
Jun 2, 2017
2,832
2,727
Uncharted Waters
Hi, I'm the guy that put together the installer / switcher scripts, along with the installation guide.

I tried installing Java 6 / 7 and switching between all three versions, and everything works seamlessly.

However, this error strikes me as familiar, if memory serves. I believe that on certain installs, maybe around 5 to 10% of the time as a sort of fluke, the installer can screw Java 5 up, but I did not see this problem appear enough to confirm that as a possible issue.

Nonetheless, this sounds like some kind of symlink issue. The easiest method of repair would be to replace JavaVM.framework with a fresh one if you have any other Leopard installs, and then just try the process again.

As to the problem with Java 1.6, I couldn't say as @JoyBed is the one who put the actual files together. But the main problem with actually using them is that virtually everything on PowerPC OS X 10.5.8 is expecting to use Java 1.5, as that was the last officially released version, so it's not quite that 1.6 or 1.7 don't work, but more-so that almost nothing is programmed to just use them.

What does ls /System/Library/Frameworks/JavaVM.framework say, likewise ls /System/Library/Frameworks/JavaVM.framework/JavaVM ?
 
Last edited:

alex5230

macrumors newbie
Original poster
Sep 10, 2018
7
1
Sicily, Italy
Hi @z970mp , first I want to say thank you for putting together the installer and the guide.

I have a Time Machine backup of my system, so source a fresh JavaVM.framework folder is not a problem. I was more than confident that this would work because JoyBed said he actually used this Java versions with a microcontroller IDE. As far as I know, Arduino IDE is the only PPC compatible board IDE existing.

I tested the ls commands you provided, and this is what Terminal does:

power-mac-g4-di-alessandro:~ alessandro$ ls /System/Library/Frameworks/JavaVM.framework
Classes Commands Headers JavaVM Resources
CodeResources Frameworks Home Libraries Versions

power-mac-g4-di-alessandro:~ alessandro$ ls /System/Library/Frameworks/JavaVM.framework/JavaVM
/System/Library/Frameworks/JavaVM.framework/JavaVM

I should try to replace the JavaVM.framework with my backup and try again the install?

Also, I don't know if this could help, but I'm using a CPU upgrade card. It's a single OWC Mercury Extreme now clocked @1.33GHz. I'm telling this because usually this CPU messes up the OS installation process. In fact to do a fresh reinstall usually I have to swap back the stock Apple CPU.

EDIT: I tried to download an older version of the Arduino IDE, known to work with Java 5, and it's still behaving the same. Then I tried Cyberduck (known Java app) and that works flawlessly
 
Last edited:

z970mp

macrumors 68030
Jun 2, 2017
2,832
2,727
Uncharted Waters
@alex5230 I just checked my own install, and JavaVM does indeed appear to lead to the same path. A confusing situation...

We could troubleshoot around with different manual symlinking and try to get somewhere with version 1.5, but yes, replacing the entire framework and starting over would save the most time and be the most straightforward.

So, that would be my suggestion. You will need a fresh java 6 and 7 folder from the zip archive.

Your OWC Mercury Extreme should not cause any problems here, don't worry. :)
 
  • Like
Reactions: alex5230

alex5230

macrumors newbie
Original poster
Sep 10, 2018
7
1
Sicily, Italy
Okay, I replaced the folder and did the installation process and everything works fine! The terminal gives no errors and the Arduino 1.0.6 IDE (that requires Java 6) works! Thank you for your help and generally for your contribution to the PPC community.
 
  • Like
Reactions: z970mp

JoyBed

macrumors regular
Jun 14, 2019
165
136
As to the problem with Java 1.6, I couldn't say as @JoyBed is the one who put the actual files together. But the main problem with actually using them is that virtually everything on PowerPC OS X 10.5.8 is expecting to use Java 1.5, as that was the last officially released version, so it's not quite that 1.6 or 1.7 don't work, but more-so that almost nothing is programmed to just use them.
Actually thats the biggest issue with versions above 1.5 because whole systemis made in a way that nothing newer than 1.5 exists.
Okay, I replaced the folder and did the installation process and everything works fine! The terminal gives no errors and the Arduino 1.0.6 IDE (that requires Java 6) works! Thank you for your help and generally for your contribution to the PPC community.
Im glad to hear that! Enjoy it.
 
  • Like
Reactions: z970mp
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.