tags:

views:

483

answers:

2

Hi All

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.

+3  A: 

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.

bmargulies
A: 

The first part that surprises me is that it tries to use the server JVM instead of the regular one, but that might be a feature of your build. The second thing I'd try is to run ant -v instead of plain ant. This should give you a lot more output and hopefully more information as to what ant is trying to do at this point in time.

Timo Geusch