ideace build failure: unable to find javac compiler

Hello,

I am unable to build a current pull of community (current as of 437d43a), failing with the following kaboom:

[java] jdk16.home is not defined. Defaulting to C:\jdk1.6.0_25
[java] jdkHome is not defined. Defaulting to C:\jdk1.6.0_25
[java] ##teamcity[progressMessage 'Cleaning up sandbox folder']
[java]    [delete] Deleting directory E:\proj\jetbrains\community\out
...
[java] ##teamcity[progressMessage 'Cleaning E:\proj\jetbrains\community/out/classes']
[java] Total 100 chunks for PRODUCTION_COMPILE detected
[java] ##teamcity[progressMessage 'Making module platform-resources-en']
[java]     [mkdir] Created dir: E:\proj\jetbrains\community\out\classes\production\platform-resources-en
[java]     [javac] : warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[java]      [copy] Copying 151 files to E:\proj\jetbrains\community\out\classes\production\platform-resources-en
[java]
[java] BUILD FAILED
[java] E:\proj\jetbrains\community\build\gant.xml:17: : Unable to find a javac compiler;
[java] com.sun.tools.javac.Main is not on the classpath.
[java] Perhaps JAVA_HOME does not point to the JDK.
[java] It is currently set to "C:\jdk1.6.0_25\jre"
[java]
[java] Total time: 2 seconds


I have not knowingly changed anything in my setup, and yes %JAVA_HOME% is set to the correct value.

Does this look familiar to anyone, or should I spend more time digging around?

  Thanks kindly,
  -- /v\atthew

8 comments
Comment actions Permalink

Hi Matthew,

Your log ouput contains the following: 'Unable to find a javac compiler ... Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\jdk1.6.0_25\jre"'


Set JAVA_HOME to 'C:\jdk1.6.0_25' instead.

Denis

0
Comment actions Permalink

Set JAVA_HOME to 'C:\jdk1.6.0_25' instead.

That was what I meant when I said that %JAVA_HOME% was set correctly: it is set to JAVA_HOME=C:\jdk1.6.0_25 and my PATH contains that same value (...ram Files\Perforce;C:\jdk1.6.0_25\bin;C:\vim\vim73;...). Most importantly, my envionment has not changed (I have been building the nightly community with a script since forever).

I find it suspicious that the script is reporting two errors: that JAVA_HOME is not set (which it is) and that it is incorrectly set to %JAVA_HOME%\jre which it is not.

  Thanks for your time,
  -- /v\atthew

0
Comment actions Permalink

The script doesn't report that JAVA_HOME is not set. It's comlaining only about incorrect value.

Let me try to reproduce the problem at local environment.

Denis

0
Comment actions Permalink

I went splunking in the ant-ant-gant invocation chain and discovered that the following invocation works as expected:

java -ea -Xmx512m -jar lib\ant\lib\ant-launcher.jar -lib build\lib\gant\lib -f build\gant.xml -Dgant.script=%CD%\build\scripts\dist.gant


I guess if no one else is having any problems, I'll chalk it up to the existance of $HOME/.ant/lib (although, as I mentioned, that directory and its contents have not changed since April of last year).

As an attractive side-effect, all the build output is no longer wrapped in the ugly [java] line prefix. :-)

  I hope this helps someone else,
  -- /v\atthew

Message was edited by: Matthew Daniel (the indent didn't stick using the rich editor)

0
Comment actions Permalink

My team also encountered this problem today.

It seems it is caused by/related to the ant upgrade from 1.8.1 to 1.8.2 in the latest snapshot of xena (in xena/lib/ant).  Using ant 1.8.1 (grabbed from an older xena snapshot) resolves this.

Any ideas when the official fix will show in the external repository?

0
Comment actions Permalink

Sorry, forgot about xena. Shoul be there in an hour.

0
Comment actions Permalink

This works for me. Thanks... :)

0

Please sign in to leave a comment.