Hi Laurent,
Hmm. I am wondering about your message, because IIRC, the compliance
level almost define the target java version for compiled class. I mean
if I select compliance level 1.5, the generated class cannot be compiled
for java 1.3 because 1.3 JVM cannot handle some of the new features
introduced in java 1.5. I can be wrong be I can recall it is not
possible to set that way in eclipse. I mean a higher compliance level
(ie: 1.5) and a lower compilation level (ie: 1.3). It simply does not work.
Best Regards,
Antonio Gallardo.
El 28/08/09 01:27, Laurent Medioni escribió:
Hi,
Yes I used it, but it only affects the compliance level, not the generated
class file compatibility, which is directly taken from the version of the
running JVM... And the default of the switch/case is 1.3...
So I had to replace the 2 switch/cases in EclipseJavaCompiler (1 for the source
code version and 1 for the target version) with new ones defaulting to 1.5 if
the version is greater than 1.5.
So using JDT 3.1 and running a 1.6 JVM produces 1.5 code (which is the limit of
JDT 3.1).
My second try has been to use JDT 3.5 and modifying again EclipseJavaCompiler
to properly manage 1.6. And everything seems to work fine.
Laurent
________________________________________
From: Antonio Gallardo [mailto:agalla...@agssa.net]
Sent: jeudi, 27. août 2009 23:37
To: users@cocoon.apache.org
Subject: Re: Cocoon 2.1.11- XSP compiled in Java 1.3 when running Cocoon with a
1.6 JVM and using the Eclipse compiler
Hi Laurent,
Please look into the cocoon.xconf for the configuration of eclipse compiler and set the value to
"1.5" instead of "auto". Here is the code:
<!--+
55 :
| Specifies the java code source version used to compile the XSP code.
56 :
|
57 :
| Posible values:
58 :
| 1.3 = Java version 1.3
59 :
| 1.4 = Java version 1.4
60 :
| 1.5 = Java version 1.5
61 :
| auto = The version of the JVM where cocoon is running. (Default value).
62 :
|
63 :
| NOTE: The parameter is optional to keep backward compatibility.
64 :
anathaniel
555089
| The parameter works with Sun Javac compiler and the Eclipse compiler.
65 :
antonio
124779
| The pizza compiler does not support java 1.5.
66 :
+-->
67 :
<!--<parameter name="compiler-compliance-level" value="auto"/> -->
Best Regards,
Antonio Gallardo
____________________________________________________________
� This email and any files transmitted with it are CONFIDENTIAL and intended
solely for the use of the individual or entity to which they are addressed.
� Any unauthorized copying, disclosure, or distribution of the material within
this email is strictly forbidden.
� Any views or opinions presented within this e-mail are solely those of the
author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
� An electronic message is not binding on its sender. Any message referring to
a binding engagement must be confirmed in writing and duly signed.
� If you have received this email in error, please notify the sender immediately
and delete the original.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org