8 Replies Latest reply on Apr 6, 2011 10:05 AM by yachts99

    JAVA Virtual Machine suddenly missing in FB4

    yachts99

      Suddenly I am unable to launch FB4 and get the following popup/error message saying "No Java virtual machine was found..." etc.

       

      FB was launching fine until recently and I'm not sure what has changed. I'm certainly not aware of having removed any Java virtual machine!

       

      Any suggestions as to why this happening.

       

      Mac OSX 10.6.7

       

      Screen shot 2011-04-04 at 14.13.16.png

        • 1. Re: JAVA Virtual Machine suddenly missing in FB4
          C. Agruss (Adobe) Level 3

          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.

           

          -Chris

          • 2. Re: JAVA Virtual Machine suddenly missing in FB4
            yachts99 Level 1

            Unfortunately that has not made a difference.

             

            I moved the 32-bit version to the top of the list, restarted and it was still at the top but FB still shows the same message on launch.Screen shot 2011-04-05 at 08.52.46.png

            • 3. Re: JAVA Virtual Machine suddenly missing in FB4
              C. Agruss (Adobe) Level 3

              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?

               

              -Chris

              • 4. Re: JAVA Virtual Machine suddenly missing in FB4
                yachts99 Level 1

                Hi Chris,

                 

                Yes I've tried that now with the 64-bit version on the top and java -version does show as being 64-bit. Here are the two sequential screen shots (64-bit second).Screen shot 2011-04-05 at 17.32.55.png

                 

                Screen shot 2011-04-05 at 17.34.40.png

                Same error message appearing when I launch FB though.

                • 5. Re: JAVA Virtual Machine suddenly missing in FB4
                  C. Agruss (Adobe) Level 3

                  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

                  - /configuration/config.ini

                   

                  -Chris

                  • 6. Re: JAVA Virtual Machine suddenly missing in FB4
                    yachts99 Level 1

                    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.

                     

                    <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Com mands/java</string>

                     

                    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.

                    • 7. Re: JAVA Virtual Machine suddenly missing in FB4
                      C. Agruss (Adobe) Level 3

                      > 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:

                      /Users/yourUserName/Library/Preferences/com.apple.java.JavaPreferences.plist

                      -Chris

                      1 person found this helpful
                      • 8. Re: JAVA Virtual Machine suddenly missing in FB4
                        yachts99 Level 1

                        Well that workaround got it working!

                         

                        I added

                         

                        <string>-vm</string><string>/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Com mands/java</string>

                         

                        to Info.plist and now FB launches.

                         

                         

                         

                        I also had a look in

                        /Users/yourUserName/Library/Preferences/com.apple.java.JavaPreferences .plist

                        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!