I have just installed ant and JDK 6 and am trying to run an ant task. I get the following:
C:\Users\Giles Roadnight\workspace\Parsley\build>ant compile_spicelib_complete_flex
Buildfile: build.xml
compile_spicelib_complete_flex:
[exec] Error loading: C:\Program Files\Java\jdk1.6.0_17\jre\bin\server\jvm.dll
[exec] Result: 6
BUILD SUCCESSFUL
Total time: 0 seconds
C:\Users\Giles Roadnight\workspace\Parsley\build>
That file - jvm.dll is definitely there. I have tried running as an administrator with the same result.
To install I ran the JDK installer (I already had a JRE installed), I set up JAVA_HOME in my environment variables. I unzipped ant and added my ant bin directory to my PATH.
I am clueless about Java and how it all works so am a bit lost with this.
I am on 64 bit windows 7. I downloaded a 64 bit JDK.
Any help much appreciated.
you must have Unzipped your flex to some folder. I am referring to this folder as flex_sdk.
Add flex_sdk to the FLEX_HOME environment variable (creating the environment variable if necessary). Flex compiler needs a 32 bit JRE since there is currently no support for 64 bit JRE. For this, first download a 32 bit(or X86) version of jdk and later have the flex sdk point to it.To do so, you'll need to edit the jvm.config file located in FLEX_HOME\bin. Within jvm.config, set java.home to the location of your 32 bit JDK as shown.(Note that these are not backslashes)
Example: java.home=C:/Program Files (x86)/Java/jdk1.6.0_25
Alternatively, you can also add an environment variable with the name JAVA_HOME
and have it point to the above location if you are not able to find the jvm.config file.
/I had the same problem and researched on this for a couple of days. Tried 100s of classpaths and loads of corrupted registry issues. The above solution seemed to work for me. Let me know if it works for you as well/
-Prasad K
It looks to me as if the ant script is running a native program which in turn tries to load the JVM to run some java code, and fails. I would guess that there is a mismatch between 32-bit and 64-bit-ness. The package you are trying to run is, in this theory, using a 32-bit Windows executable which is failing to LoadLibrary the 64-bit JVM DLL.
A simpler possible explanation is that many things in the Java universe get befuddled by spaces on pathnames. Try installing the JDK in a pathname with no embedded spaces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With