I would like to know if it is possible to launch a war which have to run with the JDK 1.5 (not compliant with JDK 1.6) und开发者_如何学Pythoner Webpshere 7.
It is not possible/supported to run WebSphere Application Server 7.0 process with any other JDK than the one that is bundled with the product.
I guess I'm confused by your question. JRE's are to be backwards compatible. So the 1.6 JRE within IBM WebSphere Application Server V 7.x.x.x will run Java EE code as far back as Java EE 1 (which I think might be Java 1.2 compliant) and should support Java SE code as far back as 1.1. (Why you'd want to go that far back, I'm not sure....).
There really is no trouble to it. Just compile your code with a 1.5 JDK (that's what we do), or if you want you could compile it with a 1.6 compiler and flag the compiler to use 1.5.
Your code doesn't have to be 1.6 compliant. It just has to be 1.5 compliant and it will run fine. That is the whole point of abstracting and backwards compatibility with the JDK and JRE.
As an example for you, we have an enterprise application that we compile with Maven 2 using Sun/Oracle's 1.5 JDK. We package in several open source project jars, some of which are even as old as 1.3 compliant and/or compiled.
We package all of this up as an EAR using Maven 2 and we deploy it to IBM's WebSphere Application Server (and we run 7.0.0.9). Our code runs just fine. We even have some modules that we do compile with JDK 1.6 to leverage certain functions in 6, but most of the code is compiled as 1.5. And it runs fine.
So I guess I'm confused what you are asking. Could you provide a more concrete example of what you are trying to do? Because from what you have told me, you should be able to run just fine in WAS 7 without compiling at JDK 6.
精彩评论