how to compile a plugin for JDK 1.5 and IntelliJ 8.x+


I've released a plugint hat is compiled against 1.6. I have a user who reports that he is using JDK 1.5 and IDEA 8.x. I've tried to compile against 1.5 but with no luck

*) In platform settings under JDKs I've added JDK 1.5 (and 1.4, 1.6). I then add a IDEA SDK and a drop-down in a popup opens. There I can choose a JDK version for the IDEA SDK . The _only_ option there is 1.6. No 1.5 or 1.4.

*) I then try to launch my IDEA with 1.5. No luck:
toomasr@cigar:~/downloads/idea-9886/bin$ ./
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass2(Native Method)
        at java.lang.ClassLoader.defineClass(
        at Method)
        at java.lang.ClassLoader.loadClass(
        at sun.misc.Launcher$AppClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClassInternal(

*) I try to compile my stuff from the commandline but the plugin does not work then. I use .form files and I think there is some post-processing going on that I don't know about.

*) I looked into how to run IDEA 8.x with JDK 1.5 and it seems that only Mac users have that luxury.

What are my options to release my plugin compiled against JDK 1.5?


Please sign in to leave a comment.