[daisy] Compiled Daisy using JDK 1.6 won't run on Java 1.5
Jochen Seifarth
js+daisy at agentbob.info
Mon Apr 21 13:20:15 CEST 2008
I bumped into the problem (compiling on 1.6, trying to run on 1.5) as I
tried to compile a changed version of of daisy-image-presavehook which I
then deployed on a repository server running on Java 1.5.
Therefore I followed the excellent build instructions in daisy/README.txt,
and didn't care to look into distro/core/README.txt which has the note
about 1.5. Also, I didn't see any need to build the daisywiki and
consequently also missed the hint about the target JVM there.
That's how I completely missed the hints about Java 1.5.
Just thought I'd share this so that others can avoid this pitfall.
Fully agree, maven.compile.target=1.5 or maven.compile.source=1.5 will not
help when using Java 6 API, but it might help people trying to build
Daisy.
Regards
Jochen
Am Fr, 18.04.2008, 12:01, schrieb Karel Vervaeke:
> 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.
>>
> _______________________________________________
> daisy community mailing list
> Professional Daisy support:
> http://outerthought.org/en/services/daisy/support.html
> mail to: daisy at lists.cocoondev.org
> list information: http://lists.cocoondev.org/mailman/listinfo/daisy
>
More information about the daisy
mailing list