tags:

views:

37

answers:

1

Downloaded and installed the latest version of a FlexSDK. Unzipped it into a folder C:FlexSDK. Opened up my command prompt to C:/FlexSDK/bin. Ran a directory of the folder and my mxmlc.exe file was there. From the command prompt I issued mxmlc c:test.mxml and received a "could not find a JVM" error. This is surprising because I have compiled mxml files from the command prompt on my computer before. Also I have developed, compiled, and ran java programs before from the command prompt. I know I have a JRE on my system. As a matter of fact it is located at "C:\Program Files\Java\jre6". As I stated earlier I have compiled mxml files a while back. I dont understand what the problem might be now. Any help would be very much appreciated.

JM

+1  A: 

From http://jonemerson.net/blog/?m=200607 and http://www.flashdevelop.org/community/viewtopic.php?f=13&t=2842

It turns out that if you’re on Windows and you have JAVA_HOME defined using backslashes, it will not work. Instead you must set JAVA_HOME using forward slashes in your environment variables, or create a jvm.config file next to mxmlc.exe containing the line “java.home=c:/j2sdk1.4.2_12″(or equivalent).

Note this is the path to the JDK not the JRE. Something like C:/Program Files/Java/jdk1.6.0_11

JoseK
In my java.home = in my jvm.config file, should I have the directory to where my Java is located: c:/Program Files/java/jdk1.6.0_20/binORthe directory to where my FlexSDK is located: c:/FlexSDK/javaJM
Jerry McLeod
java.home = c:/Program Files/java/jdk1.6.0_20 should be it.
JoseK
@Jerry if this answer worked for you, you could mark it as accepted :)
JoseK