javaweb-applications

Compiling and upgrading to JDK 1.7


My team has intentions to upgrade our application server to run using JDK 1.7 and continue to serve our web application which is compiled using JDK 1.5

Due to the age of our project, we can't guarantee the source code we had is the latest thus we would like to minimize file changes on the server.

I would like to know if there any benefits to re-compile our web application using JDK 1.7 and deploy to the application server?


Solution

  • There is no beneift to re-compiling your code, other than to detect incompatible API changes (there should be very, very few) e.g. if you have implemented your own JDBC driver, it won't compile without some work.

    All the interesting work is done by the JIT at runtime. The javac compile just sanity checks the code and translates as simply as it can.