Opened 20 months ago
Closed 20 months ago
#23172 closed task (fixed)
Java 11 deprecated, soon replaced by Java 17 - Roadmap?
Reported by: | Gubaer | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | java17 | Cc: |
Description
Both JOSM's latest and tested versions now display a warning in a modal dialog that soon JOSM won't work anymore with Java 11.
Two questions:
- Is there already a roadmap for the migration to Java 17? When is it going to take place?
- Do plugin providers have to provide a release of their plugin for Java 17 simultaneously?
Attachments (0)
Change History (5)
comment:1 by , 20 months ago
comment:3 by , 20 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I'm still confused about the following issue:
- JOSM tested and latest are currently built with a JDK 11 compiler. The class file version is 55.
- If I compile a plugin with a JDK 17 compiler, its class file version is 61.
Consequences:
- User uses a JVM 11, JOSM latest (with class version 55), and my plugin (with class version 61) -> fatal java.lang.UnsupportedClassVersionError
- User uses a JVM 17, JOSM latest (with class version 55) and my plugin (with class version 61) -> OK
Does this mean I should wait to publish a plugin jar compiled with JDK 17 until the first JOSM latest (or JOSM tested?) compiled with JDK 17 is out?
comment:4 by , 20 months ago
No.
Specifically, you want to set the Plugin-Minimum-Java-Version
in MANIFEST.MF to the lowest supported Java version your plugin supports. See wiki:DevelopersGuide/DevelopingPlugins#ThemanifestfileforaJOSMplugin for other manifest entries that you might be interested in.
For an example (using the "standard" ant builds), see https://josm.openstreetmap.de/browser/osm/applications/editors/josm/plugins/pmtiles/build.xml#L18 .
JOSM tested and latest are currently built with a JDK 11 compiler. The class file version is 55.
They should have a class file version of 52 (Java 8); we haven't changed the target Java version yet. Did you download them from the main page? If so, we have a release issue, and we need to fix it, which is probably intermittent because I just checked and it had class file version 52.0.
comment:5 by , 20 months ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Ah, I see, thanks! Closing.
For moving to Java 17, we are hoping to get <10% (ideally <5%) of users to Java 17 before we drop Java 8 support.