I have class corresponding with Java 1.5 and later. It's compiled in Java 1.7.
And now turns out that I have to launch it on Java 1.3.
How to solve that problem?
4 Answers
if you have the source files iwould just try to compile it in the version you need. if this won't work you need to "get rid of" unsupported stuff (e.g. generics)
if you don't have the source-files, i would trying to decompile it and compile it in the version you need.

- 1
- 1

- 10,139
- 6
- 45
- 78
You code in 1.5 and you compiled in Java 1.7(Java 7). if you want to run this one in to Java 1.3 then you need to sure about API what you used in code. The API what is used in code it should support in Java 1.3.
Example:-
Lets have a example. if you use generics in you code. but as we know java 1.3 not support generics. so this code not going to work on Java 1.3. you need to remove and look for alternative.

- 681
- 1
- 8
- 33
There are a few things to consider:
- Class format (you can set the target class format to 1.3 even with 1.7 compiler)
- API changes
- Must not use generics

- 15,408
- 6
- 37
- 48
Ok, I solved it that way (quite primitive):
I compiled it using javac
, then I opened it in Hex Editor, eight byte changed on 2F
, saved and it works!

- 1,592
- 6
- 22
- 49