views:

98

answers:

2

When I run my Ant build in Eclipse, I'm getting the following error message and the Ant build fails.

Error Message: Error running javac.exe compiler

Line where the build stops:

<javac destdir="${classes.home}" debug="on" fork="true" memoryinitialsize="512M" memorymaximumsize="1G">
        <classpath refid="classpath"/>
        <src path="${source.home}"/>
</javac>

Has anyone faced a similar problem before? or does anybody know what's wrong here?

System Information: Eclipse Helio, JDK 1.5

A: 

Maybe the javac problem is because "javac.exe" is not in your System PATH, please edit your system path and add your JDK's /bin directory to it to correct this problem.

Open a shell or command prompt and try typing: javac to check if the system path is set correctly.

Impiastro
i have configured the JDK in Eclipse "Installed JRE's" preference page I think Eclipse takes care of putting the javac in claspath.
Veera
Don't confuse CLASSPATH with SYSTEM PATH, the classpath is used for compilation purposes, system path takes care of system binaries.You can try if the problem is that, just append the JDK bin path to your SYSTEM PATH.
Impiastro
A: 

Try changing memorymaximumsize="1G" to memorymaximumsize="512M".

fuwaneko