You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2020/01/14 16:02:00 UTC

[jira] [Comment Edited] (JUNEAU-179) Move build process to Java 9.

    [ https://issues.apache.org/jira/browse/JUNEAU-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17015182#comment-17015182 ] 

Gary D. Gregory edited comment on JUNEAU-179 at 1/14/20 4:01 PM:
-----------------------------------------------------------------

{quote} So the build should still produce Java 8 compatible artifacts.
{quote}
It might not. I've had problems in the past with code compiled against Java 9 blows up on Java < 9. 

It depends what Java 9 APIs you use, especially with code that use classes in the java.nio.Buffer hierarchy because some APIs have changed return types in Java 9.

For example, Java 7 defines java.nio.Buffer.clear() but Java 9 redefines it in ByteBuffer by adding [https://docs.oracle.com/javase/9/docs/api/java/nio/ByteBuffer.html#clear--]

So just because you tell the Java 9 compiler to produce Java 8 byte codes does not mean your code will not blow up.

There is no list I found where Oracle blew up compatibility like that.

 


was (Author: garydgregory):
{quote} So the build should still produce Java 8 compatible artifacts.
{quote}
It might not. I've had problems in the past with code compiled against Java 9 that does not run on Java < 9. 

It depends what Java 9 APIs you use, especially with code that use classes in the java.nio.Buffer hierarchy because some APIs have changed return types in Java 9.

For example, Java 7 defines java.nio.Buffer.clear() but Java 9 redefines it in ByteBuffer by adding [https://docs.oracle.com/javase/9/docs/api/java/nio/ByteBuffer.html#clear--]

So just because you tell the Java 9 compiler to produce Java 8 byte codes does not mean your code will not blow up.

There is no list I found where Oracle blew up compatibility like that.

 

> Move build process to Java 9.  
> -------------------------------
>
>                 Key: JUNEAU-179
>                 URL: https://issues.apache.org/jira/browse/JUNEAU-179
>             Project: Juneau
>          Issue Type: Improvement
>          Components: Code
>    Affects Versions: 8.1.3
>            Reporter: James Bognar
>            Priority: Major
>
> Current maven build fails if using anything other than Java 8 due to reliance on com.sun.* packages in our custom doclet tags in juneau-doc package.  
> Java 9 introduces new [jdk.javadoc.doclet.Taglet|[https://docs.oracle.com/javase/9/docs/api/jdk/javadoc/doclet/Taglet.html]] API which is both nicer and also managed through Maven dependencies (unlike tools.jar which requires referencing the jar directly).  
>  
> Besides this change, there is no compelling reason to move to Java 9 yet.  So the build should still produce Java 8 compatible artifacts.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)