Compc – Error: could not find a JVM.

Posted on March 21, 2006 | 4 comments

I fired up a command prompt and wanted to learn a little about “compc”. Well I got this error message. To no avail all I could find on google was a url in Japanese Here is the page.

The page gave me enough info to go look for a “jvm.config” located in the Flex install folder (C:\Program Files\Macromedia\Flex” folder for me, its in the “bin” folder where “compc” is also.

Then the jvm.config page itself shed some more light on the situation.

#
# VM configuration
#
# Where to find JVM, if {java.home}/jre exists then that JVM is used
# if not then it must be the path to the JRE itself
#
# If no java.home is specified a VM is located by looking in these places in this
# order:
#
# 1) JAVA_HOME environment variables (same rules as java.home above)
# 2) bin directory for java.dll (windows) or lib//libjava.so (unix)
# 3) ../jre
# 4) registry (windows only)
#

I opted for commenting out the java.home line and letting it pick up my JAVA_HOME variable.

So if you ever run into the “Error: could not find a JVM.” while using compc, hopefully this post has been spidered so you wont have to translate (or decipher) a page in Japanese.

  • Pingback: Underlog - the simple things » Blog Archive » Flex 2.0 - до ада и обратно

  • http://chris.enunciato.org Chris

    Thanks! This helped. In my case I was working on localization (copylocale), but the fix proved perfect. Thanks again.

  • http://vibhu.myopenid.com/ vi

    Hi Ren, thanks for giving me the correct direction. I got mine working.
    However, your steps failed for me
    : setting java.home in jvm.config was useless – it wasnt being parsed
    : setting JAVA_HOME env var always gave a jre/bin/server/jvm.dll error

    When I commented out the java.home line, as well as deleted the JAVA_HOME variable was I able to get my compc working.
    I guess compc uses its own jvm.dll that comes with Flash Builder install.

  • http://twitter.com/OIIOIIOI 01101101

    Yes! Your solution worked for me as well! Thank you so much, I’ve spent an hour looking into that problem…

  • http://twitter.com/divillysausages Damian Connolly

    I got mine working by escaping the java.home path (i.e. using \ instead of ).

    the JAVA_HOME env var wasn’t working for me as it pointed to the 64bit version of Java, and all these tools only work with the 32bit version