dev@glassfish.java.net

Re: decision w.r.t. Java class version for GFv3-trunk sources ...

From: Rajiv Mordani <rajiv.mordani_at_sun.com>
Date: Tue, 17 Feb 2009 16:56:26 -0800

Hi Kedar,
   

Kedar Mhaswade wrote:
> This is what we decided in the morning meeting.
>
> http://is.gd/jTnz
>
> Let me know if we are on the same page.
>
> Giving you a summary for convenience:
>
> Since by definition, Java EE 6 requires Java SE 6 runtime, it is
> obvious that we use Java 6 for compilation. Thus, the javac used for
> compilation of Java sources in GlassFish v3 trunk is /bin/javac (or
> its equivalent). Now, the target for such a build is Java 6 runtime.
> Thus, by default, i.e. if we don't specify the -target option on
> javac, the generated classes would have a Major Version of 50.0 (which
> corresponds to Java 6). Thus, if we did that, all the modules will
> only create classes that can be loaded by Java 6 runtime. In order to
> support Java 5 runtime which might be required by some of the
> components (although their source are checked in to v3 trunk), here is
> the decision taken:
>
> 1. GlassFish v3 must be run with Java 6+ runtime only. (Can someone
> clarify if it applies to all the distro's?)
> 2. We use javac from Java 6 for compilation. Because of that, any
> module can declare compile-time dependencies on Java 6 classes, e.g.
> java.io.Console.
> 3. We use -target as 1.5 which means, by default, the major version
> of classes generated by build would be 49. This is to take care of
> running certain modules with Java 5 runtime.

Do we know what the list of modules are that want to run with Java 5
runtime?

> 4. asadmin will detect an attempt to run GlassFish with Java 5
> Runtime See: 7038 and will flag it as an error.

If asadmin is not going to allow running GlassFish with Java 5 runtime
what's the point of making the target 1.5? Is the expectation that some
of these modules could be used outside of GlassFish and that in such
cases they may not want to move to JDK 6?

- Rajiv

>
>
> Regards,
> Kedar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net