Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Damjan Jovanovic
Hi

Currently our Java policy [1] mandates a baseline of Java 5, which was
released in 2004, and was EOL from 2008; even paid Oracle customers stopped
getting updates in 2015 [2].

There are many language and class library improvements in later versions of
Java that we would benefit from in AOO, and if there are no objections, I
would like to increase the minimum version to 7, if not 8.

Java 7 would give us the badly needed try-with-resources feature, better
type inference for generics, and Java 8: lambdas and method references,
better java.util collections and lambda-based APIs for them, unsigned
integer arithmetic, etc.

The only possible downside I see is that the few alternative JVMs that do
exist, tend to only work with older version of Java, for example, the
Apache Harmony class library used in earlier versions of Android only
supported Java 5, GNU Classpath also 5, CacaoVM only supports 6 [3].
Alternative Java implementation aren't relevant to desktop users
(x86/amd64/sparc) any more, since OpenJDK provides free/open-source JVMs
for those, but other platforms and more exotic use cases do need them, eg.
the ARM JVM is only available from Oracle as a commercial product, and the
BugVM project that compiles Java to native code for the iPhone, uses the
Harmony-based Android library.

Having said that, there are ways to compile most Java 7 code into Java 5
classes. For example try-with-resources compiles into a normal
try-catch-finally, with calls to the Exception.addSuppressed() API that
only exists on Java 7, but the class file can be changed to eliminate them;
I already have a tool that does this. So I guess it's only 8 that's
controversial, as it's lambdas compile into "invokevirtual" instructions,
which didn't exist prior to Java 7.

Anyway I am proceeding with (uncommitted) development under the assumption
at least 7 is ok, and will revisit with 8 if possible. Please object soon
if you do :-).

Damjan

References:
[1] https://wiki.openoffice.org/wiki/Policies/Java_Usage
[2] https://en.wikipedia.org/wiki/Java_version_history
[3] https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines


Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Matthias Seidel
Hi Damjan,

I can only comment on a non-technical POV...

Am 09.07.2017 um 14:53 schrieb Damjan Jovanovic:
> Hi
>
> Currently our Java policy [1] mandates a baseline of Java 5, which was
> released in 2004, and was EOL from 2008; even paid Oracle customers stopped
> getting updates in 2015 [2].

That page was last updated in 2008, so it might definitely need an
overhaul. ;-)

> There are many language and class library improvements in later versions of
> Java that we would benefit from in AOO, and if there are no objections, I
> would like to increase the minimum version to 7, if not 8.

At least the OS/2 port still relies on Java 6
[http://trac.netlabs.org/java].
But I think the support is still at beta stage...

> Java 7 would give us the badly needed try-with-resources feature, better
> type inference for generics, and Java 8: lambdas and method references,
> better java.util collections and lambda-based APIs for them, unsigned
> integer arithmetic, etc.
>
> The only possible downside I see is that the few alternative JVMs that do
> exist, tend to only work with older version of Java, for example, the
> Apache Harmony class library used in earlier versions of Android only
> supported Java 5, GNU Classpath also 5, CacaoVM only supports 6 [3].
> Alternative Java implementation aren't relevant to desktop users
> (x86/amd64/sparc) any more, since OpenJDK provides free/open-source JVMs
> for those, but other platforms and more exotic use cases do need them, eg.
> the ARM JVM is only available from Oracle as a commercial product, and the
> BugVM project that compiles Java to native code for the iPhone, uses the
> Harmony-based Android library.
>
> Having said that, there are ways to compile most Java 7 code into Java 5
> classes. For example try-with-resources compiles into a normal
> try-catch-finally, with calls to the Exception.addSuppressed() API that
> only exists on Java 7, but the class file can be changed to eliminate them;
> I already have a tool that does this. So I guess it's only 8 that's
> controversial, as it's lambdas compile into "invokevirtual" instructions,
> which didn't exist prior to Java 7.
>
> Anyway I am proceeding with (uncommitted) development under the assumption
> at least 7 is ok, and will revisit with 8 if possible. Please object soon
> if you do :-).

I still have problems to build AOO for Windows with Java 8.
One user mentioned a problem with JavaDoc due to an API change in Java 8.
[http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html]

Regards, Matthias

>
> Damjan
>
> References:
> [1] https://wiki.openoffice.org/wiki/Policies/Java_Usage
> [2] https://en.wikipedia.org/wiki/Java_version_history
> [3] https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines
>




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Damjan Jovanovic
On Sun, Jul 9, 2017 at 5:44 PM, Matthias Seidel 
wrote:

> Hi Damjan,
>
> I can only comment on a non-technical POV...
>
> Am 09.07.2017 um 14:53 schrieb Damjan Jovanovic:
> > Hi
> >
> > Currently our Java policy [1] mandates a baseline of Java 5, which was
> > released in 2004, and was EOL from 2008; even paid Oracle customers
> stopped
> > getting updates in 2015 [2].
>
> That page was last updated in 2008, so it might definitely need an
> overhaul. ;-)
>
> > There are many language and class library improvements in later versions
> of
> > Java that we would benefit from in AOO, and if there are no objections, I
> > would like to increase the minimum version to 7, if not 8.
>
> At least the OS/2 port still relies on Java 6
> [http://trac.netlabs.org/java].
> But I think the support is still at beta stage...
>
>
What is the status of our OS/2 support?

The language features are the most important, and it should be possible to
use Java 7 language features while only using Java <= 5 APIs, and build
into Java 5 compatible class files, as long as javac (ie. the JDK) is from
Java >= 7.

But even if it isn't, since class files are the same on all platforms, it
should be possible to jerryrig a fake "javac" on OS/2, that compiles the
java file on a remote javac 7, and then downloads the Java 5 compatible
class file.


> > Java 7 would give us the badly needed try-with-resources feature, better
> > type inference for generics, and Java 8: lambdas and method references,
> > better java.util collections and lambda-based APIs for them, unsigned
> > integer arithmetic, etc.
> >
> > The only possible downside I see is that the few alternative JVMs that do
> > exist, tend to only work with older version of Java, for example, the
> > Apache Harmony class library used in earlier versions of Android only
> > supported Java 5, GNU Classpath also 5, CacaoVM only supports 6 [3].
> > Alternative Java implementation aren't relevant to desktop users
> > (x86/amd64/sparc) any more, since OpenJDK provides free/open-source JVMs
> > for those, but other platforms and more exotic use cases do need them,
> eg.
> > the ARM JVM is only available from Oracle as a commercial product, and
> the
> > BugVM project that compiles Java to native code for the iPhone, uses the
> > Harmony-based Android library.
> >
> > Having said that, there are ways to compile most Java 7 code into Java 5
> > classes. For example try-with-resources compiles into a normal
> > try-catch-finally, with calls to the Exception.addSuppressed() API that
> > only exists on Java 7, but the class file can be changed to eliminate
> them;
> > I already have a tool that does this. So I guess it's only 8 that's
> > controversial, as it's lambdas compile into "invokevirtual" instructions,
> > which didn't exist prior to Java 7.
> >
> > Anyway I am proceeding with (uncommitted) development under the
> assumption
> > at least 7 is ok, and will revisit with 8 if possible. Please object soon
> > if you do :-).
>
> I still have problems to build AOO for Windows with Java 8.
> One user mentioned a problem with JavaDoc due to an API change in Java 8.
> [http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html]
>
>
You must be building the 4.1 branches. Trunk has been building perfectly
with Java 8 for years, since I patched the Javadoc issues we had.


>
> Regards, Matthias
>
> >
> > Damjan
> >
> > References:
> > [1] https://wiki.openoffice.org/wiki/Policies/Java_Usage
> > [2] https://en.wikipedia.org/wiki/Java_version_history
> > [3] https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines
> >
>
>
>


Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Marcus

Am 09.07.2017 um 14:53 schrieb Damjan Jovanovic:

[...]

Anyway I am proceeding with (uncommitted) development under the assumption
at least 7 is ok, and will revisit with 8 if possible. Please object soon
if you do :-)


of course the current 4.1.x release line should be kept as it is.

If possible - also together with other ports like OS/2 or Solaris - you 
can try to update trunk to Java 8. Otherwise it's Java 7 we can go.


My 2 ct.

Marcus


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Matthias Seidel
Am 09.07.2017 um 18:07 schrieb Damjan Jovanovic:
> On Sun, Jul 9, 2017 at 5:44 PM, Matthias Seidel 
> wrote:
>
>> Hi Damjan,
>>
>> I can only comment on a non-technical POV...
>>
>> Am 09.07.2017 um 14:53 schrieb Damjan Jovanovic:
>>> Hi
>>>
>>> Currently our Java policy [1] mandates a baseline of Java 5, which was
>>> released in 2004, and was EOL from 2008; even paid Oracle customers
>> stopped
>>> getting updates in 2015 [2].
>> That page was last updated in 2008, so it might definitely need an
>> overhaul. ;-)
>>
>>> There are many language and class library improvements in later versions
>> of
>>> Java that we would benefit from in AOO, and if there are no objections, I
>>> would like to increase the minimum version to 7, if not 8.
>> At least the OS/2 port still relies on Java 6
>> [http://trac.netlabs.org/java].
>> But I think the support is still at beta stage...
>>
>>
> What is the status of our OS/2 support?

We should ask Yuri Dario for that... ;-)
Support for Java is still experimental I think.

>
> The language features are the most important, and it should be possible to
> use Java 7 language features while only using Java <= 5 APIs, and build
> into Java 5 compatible class files, as long as javac (ie. the JDK) is from
> Java >= 7.
>
> But even if it isn't, since class files are the same on all platforms, it
> should be possible to jerryrig a fake "javac" on OS/2, that compiles the
> java file on a remote javac 7, and then downloads the Java 5 compatible
> class file.
>
>
>>> Java 7 would give us the badly needed try-with-resources feature, better
>>> type inference for generics, and Java 8: lambdas and method references,
>>> better java.util collections and lambda-based APIs for them, unsigned
>>> integer arithmetic, etc.
>>>
>>> The only possible downside I see is that the few alternative JVMs that do
>>> exist, tend to only work with older version of Java, for example, the
>>> Apache Harmony class library used in earlier versions of Android only
>>> supported Java 5, GNU Classpath also 5, CacaoVM only supports 6 [3].
>>> Alternative Java implementation aren't relevant to desktop users
>>> (x86/amd64/sparc) any more, since OpenJDK provides free/open-source JVMs
>>> for those, but other platforms and more exotic use cases do need them,
>> eg.
>>> the ARM JVM is only available from Oracle as a commercial product, and
>> the
>>> BugVM project that compiles Java to native code for the iPhone, uses the
>>> Harmony-based Android library.
>>>
>>> Having said that, there are ways to compile most Java 7 code into Java 5
>>> classes. For example try-with-resources compiles into a normal
>>> try-catch-finally, with calls to the Exception.addSuppressed() API that
>>> only exists on Java 7, but the class file can be changed to eliminate
>> them;
>>> I already have a tool that does this. So I guess it's only 8 that's
>>> controversial, as it's lambdas compile into "invokevirtual" instructions,
>>> which didn't exist prior to Java 7.
>>>
>>> Anyway I am proceeding with (uncommitted) development under the
>> assumption
>>> at least 7 is ok, and will revisit with 8 if possible. Please object soon
>>> if you do :-).
>> I still have problems to build AOO for Windows with Java 8.
>> One user mentioned a problem with JavaDoc due to an API change in Java 8.
>> [http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html]
>>
>>
> You must be building the 4.1 branches. Trunk has been building perfectly
> with Java 8 for years, since I patched the Javadoc issues we had.

Yes, I am building 4.1 branch...
But with trunk I get other errors regarding gtest... ;-)

Would it be possible to backport your patches? Otherwise I will continue
to build 4.1.4 with Java 7.

Regards, Matthias

>
>
>> Regards, Matthias
>>
>>> Damjan
>>>
>>> References:
>>> [1] https://wiki.openoffice.org/wiki/Policies/Java_Usage
>>> [2] https://en.wikipedia.org/wiki/Java_version_history
>>> [3] https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines
>>>
>>
>>




smime.p7s
Description: S/MIME Cryptographic Signature


Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Damjan Jovanovic
On Sun, Jul 9, 2017 at 6:15 PM, Matthias Seidel 
wrote:

> Am 09.07.2017 um 18:07 schrieb Damjan Jovanovic:
> > On Sun, Jul 9, 2017 at 5:44 PM, Matthias Seidel <
> matthias.sei...@hamburg.de>
> > wrote:
> >
> >> Hi Damjan,
> >>
> >> I can only comment on a non-technical POV...
> >>
> >> Am 09.07.2017 um 14:53 schrieb Damjan Jovanovic:
> >>> Hi
> >>>
> >>> Currently our Java policy [1] mandates a baseline of Java 5, which was
> >>> released in 2004, and was EOL from 2008; even paid Oracle customers
> >> stopped
> >>> getting updates in 2015 [2].
> >> That page was last updated in 2008, so it might definitely need an
> >> overhaul. ;-)
> >>
> >>> There are many language and class library improvements in later
> versions
> >> of
> >>> Java that we would benefit from in AOO, and if there are no
> objections, I
> >>> would like to increase the minimum version to 7, if not 8.
> >> At least the OS/2 port still relies on Java 6
> >> [http://trac.netlabs.org/java].
> >> But I think the support is still at beta stage...
> >>
> >>
> > What is the status of our OS/2 support?
>
> We should ask Yuri Dario for that... ;-)
> Support for Java is still experimental I think.
>
> >
> > The language features are the most important, and it should be possible
> to
> > use Java 7 language features while only using Java <= 5 APIs, and build
> > into Java 5 compatible class files, as long as javac (ie. the JDK) is
> from
> > Java >= 7.
> >
> > But even if it isn't, since class files are the same on all platforms, it
> > should be possible to jerryrig a fake "javac" on OS/2, that compiles the
> > java file on a remote javac 7, and then downloads the Java 5 compatible
> > class file.
> >
> >
> >>> Java 7 would give us the badly needed try-with-resources feature,
> better
> >>> type inference for generics, and Java 8: lambdas and method references,
> >>> better java.util collections and lambda-based APIs for them, unsigned
> >>> integer arithmetic, etc.
> >>>
> >>> The only possible downside I see is that the few alternative JVMs that
> do
> >>> exist, tend to only work with older version of Java, for example, the
> >>> Apache Harmony class library used in earlier versions of Android only
> >>> supported Java 5, GNU Classpath also 5, CacaoVM only supports 6 [3].
> >>> Alternative Java implementation aren't relevant to desktop users
> >>> (x86/amd64/sparc) any more, since OpenJDK provides free/open-source
> JVMs
> >>> for those, but other platforms and more exotic use cases do need them,
> >> eg.
> >>> the ARM JVM is only available from Oracle as a commercial product, and
> >> the
> >>> BugVM project that compiles Java to native code for the iPhone, uses
> the
> >>> Harmony-based Android library.
> >>>
> >>> Having said that, there are ways to compile most Java 7 code into Java
> 5
> >>> classes. For example try-with-resources compiles into a normal
> >>> try-catch-finally, with calls to the Exception.addSuppressed() API that
> >>> only exists on Java 7, but the class file can be changed to eliminate
> >> them;
> >>> I already have a tool that does this. So I guess it's only 8 that's
> >>> controversial, as it's lambdas compile into "invokevirtual"
> instructions,
> >>> which didn't exist prior to Java 7.
> >>>
> >>> Anyway I am proceeding with (uncommitted) development under the
> >> assumption
> >>> at least 7 is ok, and will revisit with 8 if possible. Please object
> soon
> >>> if you do :-).
> >> I still have problems to build AOO for Windows with Java 8.
> >> One user mentioned a problem with JavaDoc due to an API change in Java
> 8.
> >> [http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html
> ]
> >>
> >>
> > You must be building the 4.1 branches. Trunk has been building perfectly
> > with Java 8 for years, since I patched the Javadoc issues we had.
>
> Yes, I am building 4.1 branch...
> But with trunk I get other errors regarding gtest... ;-)
>

Please provide a full log and build options / setup. My Windows trunk
builds perfectly.


>
> Would it be possible to backport your patches? Otherwise I will continue
> to build 4.1.4 with Java 7.
>
>
These are the commits you can apply to 4.1.x:
1697228
1697237
1697247
1697306
1697312



Regards, Matthias
>
> >
> >
> >> Regards, Matthias
> >>
> >>> Damjan
> >>>
> >>> References:
> >>> [1] https://wiki.openoffice.org/wiki/Policies/Java_Usage
> >>> [2] https://en.wikipedia.org/wiki/Java_version_history
> >>> [3] https://en.wikipedia.org/wiki/Comparison_of_Java_virtual_machines
> >>>
> >>
> >>
>
>
>


Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Matthias Seidel
Am 09.07.2017 um 18:38 schrieb Damjan Jovanovic:
> Please provide a full log and build options / setup. My Windows trunk
> builds perfectly.

Hi Damjan,

I will do so when I have time for trunk.
At the moment I will concentrate on 4.1.4.

Regards, Matthias



smime.p7s
Description: S/MIME Cryptographic Signature


Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Pedro Giffuni

Hello guys;

While updating the java requirements, please someone remove StaX API 
(main/stax) from the build. I recall it was only used for Java versions < 5.


Pedro.


-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Andrea Pescetti

Damjan Jovanovic wrote:

There are many language and class library improvements in later versions of
Java that we would benefit from in AOO, and if there are no objections, I
would like to increase the minimum version to 7, if not 8.


I agree (for trunk, of course). Java 7 is probably a safer choice in 
terms of compatibility.



I am proceeding with (uncommitted) development


Thanks! And we really need to make sure that a new release is cut from 
trunk as soon as possible after 4.1.4...


Regards,
  Andrea.

-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-09 Thread Keith N. McKenna
On 7/9/2017 12:13 PM, Marcus wrote:
> Am 09.07.2017 um 14:53 schrieb Damjan Jovanovic:
>> [...]
>>
>> Anyway I am proceeding with (uncommitted) development under the
>> assumption
>> at least 7 is ok, and will revisit with 8 if possible. Please object soon
>> if you do :-)
> 
> of course the current 4.1.x release line should be kept as it is.
> 
> If possible - also together with other ports like OS/2 or Solaris - you
> can try to update trunk to Java 8. Otherwise it's Java 7 we can go.
> 
> My 2 ct.
> 
> Marcus
I agree with Marcus that the 4.1.x line needs to remain as is. 4.2.x
would be the earliest version that this type of change makes sense.

Keith




signature.asc
Description: OpenPGP digital signature


Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-16 Thread Yuri Dario
> >> At least the OS/2 port still relies on Java 6
> >> [http://trac.netlabs.org/java].
> >> But I think the support is still at beta stage...


I can confirm that Java 6 is supported in OS/2 and it is no longer 
beta. But, while java7&8 ports are planned, there isn't a timetable 
for them.

thanks

Yuri




-
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org



Re: Increase minimum Java version from 5 to 7/8 ?

2017-07-20 Thread Matthias Seidel
Hi Yuri,

Thanks for the info!

After successfully building AOO for Windows, my next try will be AOO on
ArcaOS... ;-)

Regards, Matthias


Am 16.07.2017 um 18:28 schrieb Yuri Dario:
 At least the OS/2 port still relies on Java 6
 [http://trac.netlabs.org/java].
 But I think the support is still at beta stage...
>
> I can confirm that Java 6 is supported in OS/2 and it is no longer 
> beta. But, while java7&8 ports are planned, there isn't a timetable 
> for them.
>
> thanks
>
> Yuri
>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
>
>




smime.p7s
Description: S/MIME Cryptographic Signature