This photograph is taken at Cape Tribulation, Queensland, Australia, 2005. 


Flash CS3 – Error initalizing Java Runtime Environment

Yesterday, I ran into a problem where I tried to create a Flash movie containing a movieclip. While exporting I got the error : “Error initializing Java Runtime Environment. You may need to reinstall Flash.” I did some more investigation and the same error appeared when I drag a movieclip to the stage.

I also run a Java IDE accidentally and recently installed Java6 on my MacBook Pro. That is where the issue is. Check the following:


ktukker-mbp:Versions ktukker$ ls -al /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK
lrwxr-xr-x 1 root wheel 3 23 mei 08:14 /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK -> 1.6

If the CurrentJDK is linked to 1.6 Flash CS3 can’t start a 32bit JVM (dunno why it needs it, but it does on a Mac).

Execute:

cd /System/Library/Frameworks/JavaVM.framework/Versions/
sudo rm CurrentJDK
sudo ln –s 1.5 CurrentJDK

3 Responses to “Flash CS3 – Error initalizing Java Runtime Environment”

  1. Hay Says:

    Thanks, that was exactly what i needed!

  2. René Says:

    Hi thank you for the tip,

    a more convient way of switching the JDK versions is to have a link structure in
    /System/Library/Frameworks/JavaVM.framework/Versions/
    that looks like

    lrwxr-xr-x 1 root wheel 5 8 Okt 16:18 1.5 -> 1.5.0
    drwxr-xr-x 8 root wheel 272 13 Mär 14:30 1.5.0
    lrwxr-xr-x 1 root wheel 5 8 Okt 16:19 1.6 -> 1.6.0
    drwxr-xr-x 8 root wheel 272 17 Okt 12:38 1.6.0
    drwxr-xr-x 9 root wheel 306 8 Okt 16:19 A
    lrwxr-xr-x 1 root wheel 1 13 Mär 17:54 Current -> A
    lrwxr-xr-x 1 root wheel 1 13 Mär 17:58 CurrentJDK -> A

    The link “CurrentJDK -> A” enables you to change the JDK with the “/Applications/Utilities/Java/Java Preferences.app”

  3. Margaret Says:

    This is coming up for Flash CS4. How do I go about executing this fix through Terminal? Excuse my ignorance.

    Hi Margaret: I could not reproduce this anymore for Flash CS4 (10.0.2), running on MacOS 1.5.7.

    To link the CurrentJDK to “A” instead of “1.5″ as mentioned by Rene, do the following

    cd /System/Library/Frameworks/JavaVM.framework/Versions/
    sudo rm CurrentJDK
    sudo ln –s A CurrentJDK

Leave a Reply

Enter this code

 

Klaasjan Tukker

Klaasjan Tukker


Business Manager
Adobe Systems Benelux


We <3 Freedom of Choice
Partnermanager
NLJUG
    follow me on Twitter


    Founded in 1998, the Dutch Java User Group consists of business partners, software developers, application architects, technical managers, students, and new media developers that have a common interest in all aspects of Java Technology.

    Klaasjan Tukker is partnermanager of the NL-JUG, Dutch Java User Group
    All content including photographs Copyright ©2009 Klaasjan Tukker
    The picture in the header is a photograph taken at Cape Tribulation, Queensland, Australia, 2005.