Re: Ant compiling some classes as version 50 (1.6)
Timo Hoepfner <[email protected]> Tue, 28 Dec 2010 15:45:16 +0100
| Newsgroups | gmane.comp.web.webobjects.woproject.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Pascal,
I had similar problems in the past and changed all wocompile taks in
all of our build.xml files to include the encoding and the compliance
level:
<wocompile srcdir="Sources" destdir="bin" encoding="$
{compiler.encoding}" source="${compiler.source}" target="$
{compiler.target}">
And add the params in the properties used for the ant build:
compiler.encoding=UTF-8
compiler.source=1.5
compiler.target=1.5
HTH,
Timo
Am 28.12.2010 um 15:05 schrieb Pascal Robert:
> I had to deploy a app last Friday on our XServe with 10.4.11 (so no
> Java 6 for you). Eclipse is set to compile with 1.5. compliance
> level and I was able to deploy other apps on that server in the past
> while having only Java 6. But not for that app, it won't start on
> the server because of the good old "bad version number" error. So I
> decompress the .jar and found out that two of the ~60 classes from
> the app are compiled as version 50 (1.6) but the other classes are
> version 49 (1.5)! Same thing for a framework that is embedded into
> the app, 3 classes out of ~40 are built with version 50.
>
> I looked at the build that the incremental builder in Eclipse do,
> and it's all version 49. So the culprit is Ant... But I don't know
> how to fix that. I tried to search for it in Google but either I'm
> not searching with the correct terms or I didn't find anything (only
> found references of when all classes are built with the wrong
> version).
>
> Any ideas?