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

Hi

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$ ./idea.sh
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(ClassLoader.java:719)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:160)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:254)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

*) 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?

Toomas

Please sign in to leave a comment.