I've written a java program and compiled it with JDK 6, and I want to know the required Java Runtime Environment version to rum my program.
What is the minimum JRE version requirement for my java program?
This depends on the features you've used.
It may very well run on 1.3 or even 1.2 if you haven't used any methods or classes introduced in later versions.
For example, if you used String.match(), which has been introduced since 1.4, it can only run on 1.4 or newer version.
Templates were introduced in 1.5.
When you look at Java docs, you can often see "@since" tag which tells when the method or class has been introduced.
Sure way to find out is to compile your program with different JDKs - 5, 1.4, 1.3, etc. Most IDEs (Eclipse, JBuilder, NetBeans) also allow to set compatibility level for compiler. If you develop Java program for mass distribution, it's always a good idea to use oldest possible version for development.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment