Error running javac.exe compiler

TeamCity has been working fine, and I suddenly get this error:

BUILD FAILED c:\TeamCity\buildAgent\work\Server\MSP_Triumph_CSI\buildmsp\build.xml:290: Error running javac.exe compiler


JAVA_HOME is set in Windows, and I've also tried to manually force it via the Project settings.

Any ideas people? Thanks in advance.

8 comments

Hi,

Usually such error occures when build is unable to find JDK to run your build.
Please make sure that JAVA_HOME points to JDK and not JRE.
You can specify JAVA_HOME using buildAgent/conf/buildAgent.properties file using syntax
env.JAVA_HOME=c:
java
jdk1.5.xx

Regards,
KIR

0

Thanks for the reply, but it's already set:

env.JAVA_HOME=C\:
Program Files
Java
jdk1.6.0_01

And not working...

0

It seems to be a problem when forking the compile process in the ant build. Setting to false seems to make it work again, though I'm not sure why it used to work with forking and suddenly has decided not to.

0

I'm encountering exactly the same prb, did you succeeded to find a solution?

0

Well yes, it's what I said above your reply. I stopped the build process from forking which solved the problem.

0

where did you set env.JAVA_HOME=C\:
Program Files
Java
jdk1.6.0_01
???

0

This can be done in buildAgent/conf/buildAgent.properties file

HTH,
KIR

0

Hello!

We faced the same problem today.
I've made build with Intellij IDEA runner, successfully parsed project and configured it.
This build works fine on Linux, but fails on Windows platform

[13:02:35]Compiling 322 source files to E:\BuildAgent\work\client_server_srlz_test\trunk\code\server\target\test\gameMechanicsTests

[13:02:35][javac] : warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

[13:02:35][javac] Error running C:\jdk-1.7-win-64\bin\javac compiler

[13:02:35]: Error running C:\jdk-1.7-win-64\bin\javac compiler


Echoing JAVA_HOME enviroment variable shows correct result, pointing to JDK. It's set in buildAgent.properties:
env.JAVA_HOME=C:\\jdk-1.7-win-64

By the way, there we a lot of modules compiled successfully, before gameMechanicsTests.
Is there some way to extend logging?
What can you suggest to fix our problem?

Thanks in advance.
0

Please sign in to leave a comment.