[daisy] Compiled Daisy using JDK 1.6 won't run on Java 1.5

Karel Vervaeke karel at outerthought.org
Fri Apr 18 12:01:33 CEST 2008


I agree.  I even think that we could argue not to include the
maven.compile.target line.  A simple text instruction about not using
Java 1.5 is easy to ignore (or to forget accidentally), but if the
default configuration produces jars that will simply not work on JDK 1.5
it will be detected a lot sooner.

On second thought, I don't think (see [0]) the compiler produces errors
when 1.6 API is used in combination with maven.compile.target=1.5 or
maven.compile.source=1.5 (I think all source=1.5 does is check for 1.5
specific syntax)  So the only way to be sure would be to actually use
JDK 1.5.

[0] -source does not do much except jdk specific syntax checks (checking
for availability would even be impossible I think)
http://midatl.radford.edu/docs/java-se-6/docs/technotes/tools/windows/javac.html

All in all, I think maven.compile.target=1.5 will not do any harm, so we
should try it.

-Karel


On Fri, 2008-04-18 at 10:34 +0200, Bruno Dumon wrote:
> On Fri, 2008-04-18 at 09:57 +0200, Karel Vervaeke wrote:
> > Thanks for reporting this.
> > Can you confirm that setting maven.compile.target=1.5 produces something
> > that actually runs on the Java 1.5 machines? (Or create a Jira issue for
> > it so we can have a look later).
> > 
> > There is a little note in distro/core/README.txt about using a 1.5 JDK
> > for performing binary distributions, perhaps we should update that as
> > well if 1.6 JDK builds work fine
> > 
> 
> While that would generate class files in 1.5 format, it won't guarantee
> that none of the 1.6 API is used, so I'd keep that rule.
> 


More information about the daisy mailing list