Unsupported major.minor version 49.0 - when using custom Swing Widget

Hi All.

I am getting "Unsupported major.minor version 49.0" in designer when I am trying to use a custom Swing widget.
The widget is compiled with java 1.5.0-beta2.
I can't recompile it with 1.4.2 because I am using some new features from 1.5.0.

Is there are any work around?

3 comments
Comment actions Permalink

I was wondering about this too..

0
Comment actions Permalink

I doubt, that there is a workaround. IDEA runs with Java 1.4, but your class
files are in Java 1.5-format, which cannot be read by Java 1.4.

Tom

0
Comment actions Permalink

Compiling with 1.5, running with 1.4, will produce this problem. The class file format changed between 1.4 and 1.5. The 1.5 VM can read the 1.4 format, and not vice-versa.

Assuming you are not using 1.5 features, you can target 1.4 JVMs using the java -target and -source options. If you are using 1.5 features, you will need to use a 1.5 JVM to run your program.

javac -source 1.3 -target 1.1 -classpath %P5_HOME%\lib\core.jar -d . package/dirs/*.java

0

Please sign in to leave a comment.