This error will happen sometimes if OS X is configured to find 64-bit Java ahead of 32-bit Java.
Here's how you can check that out:
- run the Java Preferences app found here: /Applications/Utilities/Java Preferences.app
- examine the preferred order of java versions in the list
- move your preferred 32-bit version of Java to the top of the list (if it's not already) so it will be found ahead of the 64-bit version.
Reboot, and then run Java Preferences again to make sure the settings persisted. Assuming so, then try launching FB4 again.
Let us know whether this works, or if you see something different from this in your own Java Preferences.
Here's another thing to check:
- open a Terminal window, and then type this at the prompt: java -version
- is OS X able to return the java version correctly?
If so, I would set the order back to the default, with 64-bit Java on top of 32-bit Java - there's a button labeled "Restore Defaults" in the bottom right of the Java Prefs dialog that should do that automatically.
Normally, FB4 will run fine with that default configuration on Snow Leopard, provided that OS X can find both versions as needed. After reverting to the default order, quit the Terminal (if you haven't already), and then relaunch it again. This time when you type "java -version", does it report finding the 64-bit version instead, as expected?
Glad to see that much is working.
The next thing I'd check is to see if there's a problem with the launcher config files. Sometimes, if you install eclipse updates, eclipse's p2 engine will get overambitious about updating your ini or plist files, and occasionally I've seen eclipse/p2 add bogus JRE path info to one of those files.
If you look in these three files, see if you notice any altered jvm/jre path info:
- Adobe Flash Builder 4.app/Contents/Info.plist
- Adobe Flash Builder 4.app/Contents/MacOS/Adobe Flash Builder 4.ini
OK, possibly some progress!
I've looked into all three of those files but can't see anything obviously wrong.
However, in Info.plist there is a commented out child node section inside the <array> node referring to specific Java versions. Uncommenting one of the child nodes (below), saving the file and then trying to launch FB4 worked successfully. FB opened correctly.
Commenting out the node again prevents FB from launching. So does it look as though the latest version of Java cannot be found?
Another possibly related event (maybe its of some help to you):
I'm now also unable to publish an .ipa file using the Packager for iPhone in Flash Professional CS5. I get a Java error here too "java command not found".
Thanks so much for your patient assistance.
Message was edited by: yachts99 Removed reference to installing FlexFormatter (http://sourceforge.net/projects/flexformatter/ with which FB worked correctly. I have since re-installed FB so current, non-functioning FB won't have this plugin installed.
1 person found this helpful
> Commenting out the node again prevents FB from launching. So does it look as though the latest version of Java cannot be found?
It sure sounds that way. If you enable an entry within Info.plist to the default java 1.6 path, does that work too? I just tried that on my own Snow Leopard machine, and that launched without incident too, though I wasn't having any trouble launching prior to that either.
FB4 ships with that section commented out on purpose, the same as what you'll find in eclipse's own Info.plist. I've often wondered why eclipse includes that commented out section of jvm paths - perhaps it's a fallback/workaround for some bug where OS X loses track of its Java paths.
Normally FB4 launches fine on Snow Leopard with that section commented out, but that looks like a reasonable workaround for your situation.
Here's another place these paths are stored on OS X, so perhaps see if you find anything amiss here:
Well that workaround got it working!
to Info.plist and now FB launches.
I also had a look in
but couldn't dee anything wrong, although there were plenty of references to version 1.6.
Many thanks for your help. FB shouldn't need a workaround to launch; perhaps the Apple Java update (March 07, 2011) has messed up something somewhere!