Modify

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

  1. Is there already a roadmap for the migration to Java 17? When is it going to take place?
  2. Do plugin providers have to provide a release of their plugin for Java 17 simultaneously?

Attachments (0)

Change History (5)

comment:1 by taylor.smock, 20 months ago

  1. See #17858: Moving to Java 17 mostly depends upon user uptake of Java 17+, although I have been moving plugins I maintain to Java 17+ (since there are some new language features I want to use). I haven't moved older JOSM plugins to Java 17 since I haven't done a lot of dev work on them. If I am adding a new feature, then it is highly likely I'll be moving the plugin to Java 17.
  2. They don't need to, unless the plugin developer is doing something like calling internal Java APIs. With that said, I would highly recommend looking for any usage of deprecated APIs (both from JOSM and Java).

For moving to Java 17, we are hoping to get <10% (ideally <5%) of users to Java 17 before we drop Java 8 support.

comment:2 by Gubaer, 20 months ago

Resolution: fixed
Status: newclosed

Thanks! Closing.

comment:3 by Gubaer, 20 months ago

Resolution: fixed
Status: closedreopened

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 taylor.smock, 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 Gubaer, 20 months ago

Resolution: fixed
Status: reopenedclosed

Ah, I see, thanks! Closing.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.