I can not compile with JDK 7

I have the Idea IC-117.281. I start IDEA with a batch with the following command:

@ECHO OFF

::----------------------------------------------------------------------
:: IntelliJ IDEA startup script.
::----------------------------------------------------------------------
rem SET IDEA_JDK=C:\Program Files\Java\jdk1.6.0_25
SET IDEA_JDK=C:\Program Files\Java\jdk1.7.0_04

:: ---------------------------------------------------------------------
:: Locate a JDK installation directory which will be used to run the IDE.
:: Try (in order): IDEA_JDK, ..\jre, JDK_HOME, JAVA_HOME.
:: ---------------------------------------------------------------------
IF EXIST "%IDEA_JDK%" SET JDK=%IDEA_JDK%
IF NOT "%JDK%" == "" GOTO jdk
IF EXIST "%~dp0\..\jre" SET JDK=%~dp0\..\jre
IF NOT "%JDK%" == "" GOTO jdk
IF EXIST "%JDK_HOME%" SET JDK=%JDK_HOME%
IF NOT "%JDK%" == "" GOTO jdk
IF EXIST "%JAVA_HOME%" SET JDK=%JAVA_HOME%
IF "%JDK%" == "" GOTO error

:jdk
SET JAVA_EXE=%JDK%\bin\javaw.exe
IF NOT EXIST "%JAVA_EXE%" SET JAVA_EXE=%JDK%\jre\bin\javaw.exe
IF NOT EXIST "%JAVA_EXE%" GOTO error

SET JRE=%JDK%
IF EXIST "%JRE%\jre" SET JRE=%JDK%\jre
SET BITS=
IF EXIST "%JRE%\lib\amd64" SET BITS=64

:: ---------------------------------------------------------------------
:: Ensure IDE_HOME points to the directory where the IDE is installed.
:: ---------------------------------------------------------------------
SET IDE_BIN_DIR=%~dp0
SET IDE_HOME=%IDE_BIN_DIR%\..

SET MAIN_CLASS_NAME=%IDEA_MAIN_CLASS_NAME%
IF "%MAIN_CLASS_NAME%" == "" SET MAIN_CLASS_NAME=com.intellij.idea.Main

IF NOT "%IDEA_PROPERTIES%" == "" SET IDE_PROPERTIES_PROPERTY="-Didea.properties.file=%IDEA_PROPERTIES%"

:: ---------------------------------------------------------------------
:: Collect JVM options and properties.
:: ---------------------------------------------------------------------
SET VM_OPTIONS_FILE=%IDE_BIN_DIR%\idea%BITS%.exe.vmoptions
SET ACC=
FOR /F "usebackq delims=" %%i IN ("%VM_OPTIONS_FILE%") DO CALL "%IDE_BIN_DIR%\append.bat" "%%i"
IF EXIST "%VM_OPTIONS_FILE%" SET ACC=%ACC% -Djb.vmOptionsFile="%VM_OPTIONS_FILE%"

SET COMMON_JVM_ARGS="-Xbootclasspath/a:%IDE_HOME%/lib/boot.jar" -Didea.paths.selector=IdeaIC11 %IDE_PROPERTIES_PROPERTY%
SET IDE_JVM_ARGS=
SET ALL_JVM_ARGS=%ACC% %COMMON_JVM_ARGS% %IDE_JVM_ARGS% %REQUIRED_JVM_ARGS%

SET CLASS_PATH=%IDE_HOME%\lib\bootstrap.jar
SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\extensions.jar
SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\util.jar
SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\jdom.jar
SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\log4j.jar
SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\trove4j.jar
SET CLASS_PATH=%CLASS_PATH%;%IDE_HOME%\lib\jna.jar
SET CLASS_PATH=%CLASS_PATH%;%JDK%\lib\tools.jar
IF NOT "%IDEA_CLASS_PATH%" == "" SET CLASS_PATH=%CLASS_PATH%;%IDEA_CLASS_PATH%

:: ---------------------------------------------------------------------
:: Run the IDE.
:: ---------------------------------------------------------------------
SET OLD_PATH=%PATH%
SET PATH=%IDE_BIN_DIR%;%PATH%

start "idea64" "%JAVA_EXE%" %ALL_JVM_ARGS% -cp "%CLASS_PATH%" %MAIN_CLASS_NAME% %*

SET PATH=%OLD_PATH%
GOTO end

:error
ECHO ERROR: cannot start IntelliJ IDEA.
ECHO No JDK found. Please validate either IDEA_JDK, JDK_HOME or JAVA_HOME points to valid JDK installation.
ECHO
PAUSE

:end

I can not compile because an internal error appears:

Information:An exception has occurred in the compiler (1.7.0_04). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
Information:java.lang.AssertionError: <anonymous >
Information:    at com.sun.tools.javac.util.Assert.error(Assert.java:133)
Information:    at com.sun.tools.javac.util.Assert.check(Assert.java:86)
Information:    at com.sun.tools.javac.comp.Attr.attribBounds(Attr.java:561)
Information:    at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:716)
Information:    at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:669)
Information:    at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:431)
Information:    at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:418)
Information:    at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:480)
Information:    at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:3241)
Information:    at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3164)
Information:    at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3100)
Information:    at com.sun.tools.javac.comp.Attr.visitClassDef(Attr.java:701)
Information:    at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:591)
Information:    at com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:1781)
Information:    at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1372)
Information:    at com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:504)
Information:    at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1506)
Information:    at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1321)
Information:    at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:460)
Information:    at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1287)
Information:    at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1167)
Information:    at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:496)
Information:    at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:911)
Information:    at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:781)
Information:    at com.sun.tools.javac.comp.Attr.visitTry(Attr.java:1111)
Information:    at com.sun.tools.javac.tree.JCTree$JCTry.accept(JCTree.java:1044)
Information:    at com.sun.tools.javac.comp.Attr.visitDoLoop(Attr.java:918)
Information:    at com.sun.tools.javac.tree.JCTree$JCDoWhileLoop.accept(JCTree.java:810)
Information:    at com.sun.tools.javac.comp.Attr.visitIf(Attr.java:1276)
Information:    at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1140)
Information:    at com.sun.tools.javac.comp.Attr.visitForeachLoop(Attr.java:966)
Information:    at com.sun.tools.javac.tree.JCTree$JCEnhancedForLoop.accept(JCTree.java:907)
Information:    at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:829)
Information:    at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:3120)
Information:    at com.sun.tools.javac.comp.Attr.attrib(Attr.java:3074)
Information:    at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1184)
Information:    at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:870)
Information:    at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:829)
Information:    at com.sun.tools.javac.main.Main.compile(Main.java:439)
Information:    at com.sun.tools.javac.main.Main.compile(Main.java:353)
Information:    at com.sun.tools.javac.main.Main.compile(Main.java:342)
Information:    at com.sun.tools.javac.main.Main.compile(Main.java:333)
Information:    at com.sun.tools.javac.Main.compile(Main.java:76)
Information:    at com.sun.tools.javac.Main.main(Main.java:61)
Information:    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Information:    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
Information:    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Information:    at java.lang.reflect.Method.invoke(Method.java:601)
Information:    at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:71)
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 4

Could you help me further? With JDK 6 yet it worked ...


Attachment(s):
idea64.exe.vmoptions.zip
idea64.bat.zip
2 comments
Comment actions Permalink

Peter, seems that the error is javac 7 internal error. Please file a bug there.
Thank you

0
Comment actions Permalink

Hi Peter,

did you report the error or found any solution? I run into the same problem rignt now.

Thanks for an answer,
       Katrin

0

Please sign in to leave a comment.