Hi Kedar --
There is a compilerTargetVM option in default-web.xml that you could set
for that. I'm actually not sure how that works; perhaps Hong or Tim can
provide more details. The other class files that glassfish generates are
the CMP 2.x artifacts, and as far as I know that will respect the
javac-options (so you could put -target there).
But one caveat about that: in JDK 6, compilation is done in-process (and
the class files are generally not saved) for JSPs. That makes the
development process much faster. And it's not a problem to move to JDK 5
in that case, since the class files aren't saved (unless you set an
option in the default-web.xml or applications DDs to save them).
The bigger problem, I think, is making sure that the IDE (netbeans in
the OP's case) is using a JDK that is at least as old as the JDK used by
glassfish (or that the IDE uses the -target option to javac).
-Scott
On Wed, 2008-01-02 at 15:55, glassfish_at_javadesktop.org wrote:
> Scott,
>
> Is it possible for GlassFish to ensure that the generated code always remains JDK-5 compatible? For a Java EE "5" platform, it should be possible to remain compatible with Java SE 5.0. Will that be possible as far as the application code does not use JDK-6-only library classes?
>
> In general, I have felt that when GlassFish generates code, it should pay attention to "target"
> option on javac. Is that a reasonable expectation?
>
> - Kedar
> [Message sent by forum member 'km' (km)]
>
> http://forums.java.net/jive/thread.jspa?messageID=251973
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>