7318 : compiler error while compiling plugin

I've just installed the RC3, and tried debugging the MKS plugin with it.

But it doesn't compile any more, the compiler fails with an internal error
Information:Exception in thread "main" java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main (Unsupported major.minor version 49.0)
Information: at java.lang.ClassLoader.defineClass0(Native Method)
Information: at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
Information: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:146)
Information: at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
Information: at java.net.URLClassLoader.access$500(URLClassLoader.java:107)
Information: at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:844)
Information: at java.security.AccessController.doPrivileged(Native Method)
Information: at java.net.URLClassLoader.findClass(URLClassLoader.java:369)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:562)
Information: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:438)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:494)
Information: at java.lang.Class.forName1(Native Method)
Information: at java.lang.Class.forName(Class.java:176)
Information: at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:26)
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 1

The project is set to use IDEA 7312 jdk, and is set to Java 5 language level

I then tried to create a new jdk for 7318 build but i got a new dialog doing this, asking to select a "internal java platform". What is this for, and what are we supposed to select for plugins ?

Message was edited by:
Thibaut : typos

8 comments

furthermore but I guess this was to be expected, all my IDEA jdk definitions have been messed up, merging a "normal" jdk libs with the IDEA contributed ones when i went back to IDEA 7312 as I can't compile my plugin anymore using 7318

0

Hello Thibaut,

internal java platform is jdk on which IDEA would start as well as javac,
etc. It can't be chosen by default from current IDEA distribution any more
due to dual build (?! If you want your plugin to work with Mac you have to
compile with 1.5 and our default installation bundles 1.6 ?!)

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

I'm just installed the RC3, and tried debugging the MKS plugin with
it.

But it doesn't compile any more, the compiler fails with an internal
error
Information:Exception in thread "main"
java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main
(Unsupported major.minor version 49.0)
Information: at java.lang.ClassLoader.defineClass0(Native Method)
Information: at
java.lang.ClassLoader.defineClass(ClassLoader.java:757)
Information: at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:146
)
Information: at
java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
Information: at
java.net.URLClassLoader.access$500(URLClassLoader.java:107)
Information: at
java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:844)
Information: at java.security.AccessController.doPrivileged(Native
Method)
Information: at
java.net.URLClassLoader.findClass(URLClassLoader.java:369)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:562)
Information: at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:438)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:494)
Information: at java.lang.Class.forName1(Native Method)
Information: at java.lang.Class.forName(Class.java:176)
Information: at
com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:26)
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 1
The project is set to use IDEA 7312 jdk, and is set to Java 5
language level

I then tried to create a new jdk for 7318 build but i got a new dialog
doing this, asking to select a "internal java platform". What is this
for, and what are we supposed to select for plugins ?



0

I guess this makes sense.

But, still when creating a new IDEA JDK for 7318, using Sun 1.5.0_06 as internal JDK, i get the following exception when trying to rebuild the whole plugin project.

Any idea if I've done a mistake ?
I've attached a screenshot of my JDK definition

Information:Exception in thread "main" java.lang.reflect.InvocationTargetException
Information: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Information: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Information: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Information: at java.lang.reflect.Method.invoke(Method.java:585)
Information: at com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:53)
Information: at java.lang.ClassLoader.defineClass1(Native Method)
Information: at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
Information: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
Information: at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
Information: at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
Information: at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
Information: at java.security.AccessController.doPrivileged(Native Method)
Information: at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Information: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Information: at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:269)
Information: at com.sun.tools.javac.Main.compile(Main.java:69)
Information: at com.sun.tools.javac.Main.main(Main.java:54)
Information: ... 5 more
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 1



Attachment(s):
jdk.jpg
0

Hello ,

It caused by that your IDEA sources were compiled with jdk 1.6. Build 7330
contains checks which prevent you to use incompatible IDEA|jdk versions

Sorry for inconvenience

Thank you

-


Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

I guess this makes sense.

But, still when creating a new IDEA JDK for 7318, using Sun 1.5.0_06
as internal JDK, i get the following exception when trying to rebuild
the whole plugin project.

Any idea if I've done a mistake ?
I've attached a screenshot of my JDK definition
Information:Exception in thread "main"
java.lang.reflect.InvocationTargetException
Information: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
Information: at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39)
Information: at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25)
Information: at java.lang.reflect.Method.invoke(Method.java:585)
Information: at
com.intellij.rt.compiler.JavacRunner.main(JavacRunner.java:53)
Information: at java.lang.ClassLoader.defineClass1(Native Method)
Information: at
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
Information: at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124
)
Information: at
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
Information: at
java.net.URLClassLoader.access$100(URLClassLoader.java:56)
Information: at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
Information: at java.security.AccessController.doPrivileged(Native
Method)
Information: at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
Information: at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
Information: at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
Information: at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Information: at com.sun.tools.javac.main.Main.compile(Main.java:269)
Information: at com.sun.tools.javac.Main.compile(Main.java:69)
Information: at com.sun.tools.javac.Main.main(Main.java:54)
Information: ... 5 more
Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Compiler internal error. Process terminated with exit code 1



0

If I understand you correctly, IDEA 7330 jars will be compiled using JDK 1.5 ?

Should it work when using an JDK 1.5 based IDEA as IDEA JDK ? I've tried using 7.0M2, but I still get the same error.

0

Hello Thibaut,

If I understand you correctly, IDEA 7330 jars will be compiled using
JDK 1.5 ?

Should it work when using an JDK 1.5 based IDEA as IDEA JDK ? I've
tried using 7.0M2, but I still get the same error.


There's a separate set of jars built with JDK 1.5 which is available from
the EAP download page.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

I fetched version 7330, and things seem to happen differently (although i'm not using the same pc).

One question though, I have 2 "normal" jdk defined on this IDEA installation, a 1.5 and a 1.6 (both sun's).
When I want to create an IDEA SDK, I can't choose which internal jdk to use : IDEA forces me to use 1.5 for 7.0M2 SDK, and 1.6 for 7318 and 7330.

Were you suggesting to have a separate IDEA installation to be able to release a plugin compiled (and tested) using 1.5 ?

0

follow up : on my work machine, where i have no 1.6 JDK installed, i can't create IDEA SDK for 1.6 based IDEA's (last one i have installed and that I can create a SDK for is 7.0M2).

When trying to create a SDK for 7312, 7318, or 7330 (which are the only versions I have kept installed that are newer than 7.0M2), i get the following error message : "Please, configure Java SDK to be used as IDEA internal platform (1.5 or higher)".

Not sure if a lot of people are like me but I can't install a JDK on my machine as I'm not local admin.

I attached the error dialog I get



Attachment(s):
sdkerror.jpg
0

Please sign in to leave a comment.