[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Policy/recommendation on compiling with version 1.4 vs. 1.5?



Eric Lavarde - Debian wrote:
> Hi,
> 
> my understanding of the differences between Java 1.4 and 1.5 is that
> programs compiled with Java 1.5 might not work in the JVM 1.4, but the
> other way around should always work.
> 
> So my questions:
> 1. is this correct?

Depends on the source :-)

If the source uses 1.5 features you have to compile it with JDK 1.5
However you can run it with older JDKs as long as it does not use new
classes introduced in 1.5 (Enum or java.util.concurrent ...)

If these new classes/features are not used you can compile it either
with 1.4 or 1.5 - but be aware to use the target=1.3 flag to be able
to run the code in JREs from 1.3 up to 1.5

> 2. if yes, shouldn't the consequence for Debian be, even though Sun Java
> is not officially supported, a recommendation or policy that Java packages
> should be compiled with Java 1.4, if possible?

I think it is not specified but we currently (if upstream does) still
support 1.3 - so you should compile with target=1.3 !

Regards,

Wolfgang



Reply to: