You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bsf-dev@jakarta.apache.org by sebb <se...@gmail.com> on 2008/05/20 21:24:35 UTC

Minimum of Java 1.4 for BSF 2.x?

At present build-properties.xml has

<property name="source.level" value="1.3" />

i.e. compatibility with Java 1.3 source.

The compiler target is not specified, however at least one class in
trunk uses java.util.regex which is Java 1.4+.

Would it be OK to insist on a minimum of Java 1.4 for the next 2.x release?

---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org


Re: Minimum of Java 1.4 for BSF 2.x?

Posted by "Rony G. Flatscher" <Ro...@wu-wien.ac.at>.
Hi Sebb,

>>  Hmm, not sure about this. As long as we use the 1.3 Java class format Java
>> 1.3. deployed applications can take advantage of BSF and will be able to
>> take advantage of improvements to BSF 2.x. The moment we change to the 1.4
>> class file format, this clientel gets locked out. I would assume that quite
>> a few deployments may be affected by this.
>>     
>
> Well, at the moment the classfile format is not specified.
> Perhaps using source 1.3 forces target 1.3, but it would be better to
> be specific.
>
>   
>>  Therefore, I would suggest to change the class file format to 1.4 (or
>> higher) only, if we truly take advantage of new features of those versions
>> of Java in the BSF framework itself.
>>     
>
> BSF won't currently compile using Java 1.3, because it uses
> java.util.regex in at least one class. Perhaps that was a mistake.
>   
Just ran a compilation on 1.3 and there are two engines that fail (but 
not the BSF framework itself):

    * Jython (java.util.regex), and
    * XSLTEngine (javax.xml.transform, javax.xml.stream, org.w3c.dom.Node)

Compiles cleanly with JDK 1.4.

>>  BSF engines that depend on higher class file formats (or functionality
>> introduced with later versions of Java) should indicate this dependency
>> explicitly.
>>     
>
> Should. It's often hard work finding out what Java versions are required...
>   
Right, because of BSF, I kept different JDKs from 2000 onwards, and am 
therefore able to create "clean" environments for compiling Java 
programs from 1.1 through 6.

After all, I would not object to augment the level to 1.4.

---rony




Re: Minimum of Java 1.4 for BSF 2.x?

Posted by sebb <se...@gmail.com>.
On 21/05/2008, Rony G. Flatscher <Ro...@wu-wien.ac.at> wrote:
> Hi Sebb,
>
>
>  sebb wrote:
>
> > At present build-properties.xml has
> >
> > <property name="source.level" value="1.3" />
> >
> > i.e. compatibility with Java 1.3 source.
> >
> > The compiler target is not specified, however at least one class in
> > trunk uses java.util.regex which is Java 1.4+.
> >
> > Would it be OK to insist on a minimum of Java 1.4 for the next 2.x
> release?
> >
> >
>  Hmm, not sure about this. As long as we use the 1.3 Java class format Java
> 1.3. deployed applications can take advantage of BSF and will be able to
> take advantage of improvements to BSF 2.x. The moment we change to the 1.4
> class file format, this clientel gets locked out. I would assume that quite
> a few deployments may be affected by this.
>

Well, at the moment the classfile format is not specified.
Perhaps using source 1.3 forces target 1.3, but it would be better to
be specific.

>  Therefore, I would suggest to change the class file format to 1.4 (or
> higher) only, if we truly take advantage of new features of those versions
> of Java in the BSF framework itself.

BSF won't currently compile using Java 1.3, because it uses
java.util.regex in at least one class. Perhaps that was a mistake.

>  BSF engines that depend on higher class file formats (or functionality
> introduced with later versions of Java) should indicate this dependency
> explicitly.

Should. It's often hard work finding out what Java versions are required...

> (For newer deployments there would be never troubles as it is
> very likely that Java 1.4, if not 5 or 6 would be deployed on the rolled-out
> machines already.)
>
>  ---rony
>
>
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
> bsf-dev-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: bsf-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org


Re: Minimum of Java 1.4 for BSF 2.x?

Posted by "Rony G. Flatscher" <Ro...@wu-wien.ac.at>.
Hi Sebb,

sebb wrote:
> At present build-properties.xml has
>
> <property name="source.level" value="1.3" />
>
> i.e. compatibility with Java 1.3 source.
>
> The compiler target is not specified, however at least one class in
> trunk uses java.util.regex which is Java 1.4+.
>
> Would it be OK to insist on a minimum of Java 1.4 for the next 2.x release?
>   
Hmm, not sure about this. As long as we use the 1.3 Java class format 
Java 1.3. deployed applications can take advantage of BSF and will be 
able to take advantage of improvements to BSF 2.x. The moment we change 
to the 1.4 class file format, this clientel gets locked out. I would 
assume that quite a few deployments may be affected by this.

Therefore, I would suggest to change the class file format to 1.4 (or 
higher) only, if we truly take advantage of new features of those 
versions of Java in the BSF framework itself.

BSF engines that depend on higher class file formats (or functionality 
introduced with later versions of Java) should indicate this dependency 
explicitly. (For newer deployments there would be never troubles as it 
is very likely that Java 1.4, if not 5 or 6 would be deployed on the 
rolled-out machines already.)

---rony




---------------------------------------------------------------------
To unsubscribe, e-mail: bsf-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bsf-dev-help@jakarta.apache.org