Hello all,
I have a certain question which has been haunting me for quite some time.
We all are aware that
Java comes up with a new version every now and then.
And in each new version, new API's are added, Code is optimized for performance & certain existing Bugs are fixed. Thus in general it is better to use a newer ( and probably more stable) version of Java than the Old one.
I have a couple of questions on this:
1. If i develop some code (say a
servlet) using a new java version and later deploy the class files to a server ( running
Tomcat or someother) which has an older version of Java installed (assuming that there are no new APIs used in my code). Which version of java will finally be used for my code execution? Obviously it should be the version installed on the server. In this case wouldnt my java servlet code still be performing bad since it is using the Old java version to execute though the class files are generated using the New java version.
2. If i develop some code (say a servlet) using an old java version and later deploy the class files to a server ( running Tomcat or someother) which has a new version of Java installed. Which version of java will finally be used for my code execution?
Please give these questions some careful thought and let me know the answers.
Thanks,
Sajee Joseph