Can't run plugin with Jdk1.6?

I'm writing an idea plugin, and was using an old version (several months ago) IDEA IC, and using JDK1.6 to compile and run, everything was well.

Today, I cloned the [intellij-community](https://github.com/JetBrains/intellij-community) and build a IDEA package based on the latest code, but found I have to use jdk 1.7 to compile the code, otherwise it will report an error:

Internal error. Please report to http://youtrack.jetbrains.com

java.lang.NoClassDefFoundError: java/lang/ReflectiveOperationException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:249)
    at com.intellij.ide.Bootstrap.main(Bootstrap.java:37)
    at com.intellij.idea.Main.main(Main.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: java.lang.ClassNotFoundException: java.lang.ReflectiveOperationException
    at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:148)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 9 more


My question is, if I use jdk1.7 to build my plugin, can it still run with old IDEA versions(e.g. IDEA 13)? And, on MAC, the IDEA is launched with JDK1.6 by default, will the plugin run well at this case?

And also wonder why and when IDEA use JDK1.7, from which version?
3 comments
Comment actions Permalink

This is really strange. All our builds of IntelliJ IDEA still use JDK 6, and still compile and run fine. How exactly did you build IntelliJ IDEA Community Edition?

0
Comment actions Permalink

Do I have to make sure the Jdk version I use is "1.6"? I thought I was using jdk 1.8 when I run: ant build

0
Comment actions Permalink

Yes, you need to build IDEA with JDK 6.


0

Please sign in to leave a comment.