openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damjan Jovanovic <dam...@apache.org>
Subject Re: Increase minimum Java version from 5 to 7/8 ?
Date Sun, 09 Jul 2017 16:07:24 GMT
On Sun, Jul 9, 2017 at 5:44 PM, Matthias Seidel <matthias.seidel@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?

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
> >
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message