Modify

Opened 4 months ago

Last modified 42 hours ago

#16047 new enhancement

Add compatibility with Java 11

Reported by: Don-vip Owned by: team
Priority: normal Milestone: 18.09
Component: Core Version:
Keywords: java11 Cc:

Description (last modified by Don-vip)

Follow-up of #15560

First EA builds of Java 11 are available.

Issues:

  1. WebStart will be removed in Java 11!
  2. Wiremock 2.13.0 uses javax.xml.bind.DatatypeConverter class which has been removed in JEP 320 => Solved by updating to 2.15
  3. Jacoco does not support Java 11 yet
  4. JDK-8198899: Signature of WindowsPreferences methods changes (hkey changed from int to long)

Attachments (0)

Change History (30)

comment:1 Changed 4 months ago by Don-vip

Right now the build fails with:

compile-jmapviewer:
    [javac] Compiling 50 source files to /var/lib/jenkins/jobs/Java-EarlyAccess-JOSM/workspace/jdk/JDK11/build
    [javac] /var/lib/jenkins/jobs/Java-EarlyAccess-JOSM/workspace/jdk/JDK11/src/org/jdesktop/swinghelper/debug/CheckThreadViolationRepaintManager.java:19: error: cannot access WeakReference
    [javac] import java.lang.ref.WeakReference;
    [javac]                     ^
    [javac]   bad class file: /modules/java.base/java/lang/ref/WeakReference.class
    [javac]     class file has wrong version 55.0, should be 53.0
    [javac]     Please remove or make sure it appears in the correct subdirectory of the classpath.
    [javac] 1 error

comment:2 Changed 4 months ago by Don-vip

In 13492/josm:

see #15560, see #16047 - disable error_prone on Java 10+, see https://github.com/google/error-prone/issues/860

comment:3 Changed 4 months ago by Don-vip

Now the tests fail due to removal of EE APIs: [junit] java.lang.module.FindException: Module java.se.ee not found

comment:4 Changed 4 months ago by Don-vip

In 13505/josm:

see #16047 - do not add EE modules with Java 11+

comment:5 Changed 4 months ago by Don-vip

Now jacoco crashes:

[jacoco:coverage] Enhancing junit with coverage
    [junit] FATAL ERROR in native method: processing of -javaagent failed
    [junit] java.lang.reflect.InvocationTargetException
    [junit]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [junit]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [junit]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [junit]     at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    [junit]     at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:510)
    [junit]     at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:522)
    [junit] Caused by: java.lang.RuntimeException: Class java/lang/UnknownError could not be instrumented.
    [junit]     at org.jacoco.agent.rt.internal_36ebf62.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:139)
    [junit]     at org.jacoco.agent.rt.internal_36ebf62.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:100)
    [junit]     at org.jacoco.agent.rt.internal_36ebf62.PreMain.createRuntime(PreMain.java:55)
    [junit]     at org.jacoco.agent.rt.internal_36ebf62.PreMain.premain(PreMain.java:47)
    [junit]     ... 6 more
    [junit] Caused by: java.lang.NoSuchFieldException: $jacocoAccess
    [junit]     at java.base/java.lang.Class.getField(Class.java:1958)
    [junit]     at org.jacoco.agent.rt.internal_36ebf62.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:137)
    [junit]     ... 9 more

comment:6 Changed 4 months ago by Don-vip

(this was expected as Jacoco does not yet support Java 10, because of slow ASM releases...)

comment:7 Changed 4 months ago by Don-vip

Milestone: 18.09

comment:8 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:9 Changed 3 months ago by Don-vip

In 13523/josm:

see #16047 - disable jacoco on Java 11+, see https://github.com/jacoco/jacoco/issues/629

comment:10 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:11 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:12 Changed 3 months ago by Don-vip

In 13524/josm:

see #16047 - update to awaitility-3.1.0

comment:13 Changed 3 months ago by Don-vip

In 13525/josm:

see #16047 - update to wiremock-2.15.0

comment:14 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:15 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:16 Changed 3 months ago by Don-vip

Java 11 build is stable! :)

comment:17 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:18 Changed 2 months ago by Don-vip

comment:19 Changed 2 months ago by Don-vip

Description: modified (diff)

comment:20 Changed 2 months ago by Don-vip

In 13651/josm:

see #16047 - make WinRegistry class work both with Java 8 and 11

comment:21 Changed 7 weeks ago by Don-vip

In 13695/josm:

see #15560, see #16047 - detect java 10/11 packages

comment:22 Changed 7 weeks ago by Don-vip

In 13700/josm:

see #15560, see #16047 - detect java 10/11 packages

comment:23 Changed 6 weeks ago by Don-vip

In 13715/josm:

see #16047 - implement workaround against problem seen with IcedTeaWeb 1.7.1 / Java 9 on Debian

comment:24 Changed 6 weeks ago by Don-vip

In 13716/josm:

see #16047 - catch correct exception

comment:25 Changed 4 weeks ago by Don-vip

In 13819/josm:

see #2089, see #16047 - move JavaFX classes to their own package in order to exclude them automatically when JavaFX is not on the classpath (needed for Java 11+ now that FX is gone)

comment:26 Changed 4 weeks ago by Don-vip

In 13820/josm:

see #16047 - tune add-exports options for Java 11

comment:27 Changed 4 weeks ago by Don-vip

In 13821/josm:

fix #16308, see #16047 - remove blank png icon. With jdk-11-ea+14 JOSM fails to load it (ImageProvider returns null). JDK bugs:

comment:28 Changed 4 weeks ago by stoecker

Hmm, the function should be in ImageProvider.

comment:29 Changed 4 weeks ago by Don-vip

In 13823/josm:

see #9984, see #16047 - Java 11 handles transparent PNG out of the box, disable JOSM mechanisms to force transparency on this version

comment:30 Changed 42 hours ago by Don-vip

In 13944/josm:

see #16047 - Java 11 ea has trouble to access Google in https; don't care reporting issues now

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to Don-vip
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.