PyCharm Ant Build fails "Cannot find JDK |'1.6|' for module |'xslt-rt"

I'm trying to build PyCharm from the source code. I built the project in IDEA. However, when I run ant, I get the following error message:


Buildfile: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/build.xml

cleanup:
   [delete] Deleting directory /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out

init:
    [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out
    [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/tmp

build:
     [java] Buildfile: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/build/gant.xml
     [java]
     [java] doGant:
     [java] Starting gant script /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/build/scripts/dist.gant
     [java] 'home' is not defined. Defaulting to '/media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community'
     [java] 'out' is not defined. Defaulting to '/media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out'
     [java] default:
     [java] compile:
     [java] 'jdkHome' is not defined. Defaulting to '/home/dtroxel/jdk1.6.0_45'
     [java] Loaded project /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community: 212 modules, 62 libraries
     [java] ##teamcity[progressMessage 'Cleaning up sandbox folder']
     [java]    [delete] Deleting directory /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/dist.win.ce
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/dist.all.ce
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/dist.unix.ce
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/dist.mac.ce
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/artifacts
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/artifacts/core
     [java]     [mkdir] Created dir: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/out/artifacts/jps
     [java] Starting build; cache directory: /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/.jps-build-data
     [java] ##teamcity[blockOpened name='Resources for |'xslt-rt|' production']
     [java] ##teamcity[blockClosed name='Resources for |'xslt-rt|' production']
     [java] ##teamcity[blockOpened name='Module |'xslt-rt|' production']
     [java] ##teamcity[compilationStarted compiler='java']
     [java] ##teamcity[message text='Cannot find JDK |'1.6|' for module |'xslt-rt| status='ERROR']
     [java] ##teamcity[compilationFinished compiler='java']
     [java] ##teamcity[compilationStarted compiler='java']
     [java] ##teamcity[message text='Compilation failed' status='ERROR']
     [java] ##teamcity[compilationFinished compiler='java']
     [java] ##teamcity[blockClosed name='Module |'xslt-rt|' production']
     [java] ##teamcity[compilationStarted compiler=]
     [java] ##teamcity[message text='Module |'xslt-rt|' production: org.apache.tools.ant.BuildException: Compilation failed' status='ERROR']
     [java] ##teamcity[compilationFinished compiler='']
     [java]
     [java] BUILD FAILED
     [java] /media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/build/gant.xml:50: Compilation failed
     [java]
     [java] Total time: 2 seconds

BUILD FAILED
/media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/build.xml:31: The following error occurred while executing this line:
/media/dtroxel/2TB Storage/Programs/PyCharm/PyCharm Git/intellij-community/build.xml:18: Java returned: 1
5 comments
Comment actions Permalink
I've run into the same error, did you ever solve it?
0
Comment actions Permalink
No, unfortunately, I gave up.
0
Comment actions Permalink
ok, i'll keep digging and post here if i find anything.
0
Comment actions Permalink
I fixed it!

The "Project SDK" needs to be named: "IDEA jdk".

The problem was, I clicked "New..." instead of "Edit" when setting up the Project SDK and named it something differently.

ideajdk.png
1
Comment actions Permalink

How do you do the same from command line, i.e. when running `ant build`?

0

Please sign in to leave a comment.