I am writing an eclipse plugin, compatible to java 1.5. If anybody who is working with java 1.5 or lower or higher, installs this plugin, will it work well?
-
No way to know. Voting to close. – duffymo Jun 11 '12 at 09:46
-
Agreed. Impssible to say. Some light reading: http://stackoverflow.com/questions/4692626/is-jdk-upward-or-backward-compatible – Robbie Mar 05 '14 at 13:44
3 Answers
You should included a Bundle-RequiredExecutionEnvironment: J2SE-1.5
statement in your plugin MANIFEST.MF if you are targetting java 1.5. That is both documentation and a note to the OSGi runtime about what is valid within that bundle.

- 10,614
- 1
- 25
- 32
-
Always set the required environment on your plug-in as Paul indicates. Anything lower will not allow your plug-in to start. – nitind Jun 11 '12 at 15:26
No. It won't work on lower versions if you are using java 1.5 specific library calls which are not available in lower versions.

- 20,548
- 30
- 97
- 138
It depends on what functions your plugin uses. Certain functions are eventually marked as deprecated and are dropped in future releases, this can cause issues when newer versions of Java will run your code.
On the other hand, new functions tend to be added from one version to the next, so in your case, older versions might crash since some functions your application uses simply do not exist.
At most, what you can do is to specify a minimum Java version, and eventually even this can cause problems.

- 51,780
- 5
- 72
- 96