Modify

Opened 2 years ago

Last modified 2 years ago

#22334 new enhancement

Use association element on java web start

Reported by: lucumon Owned by: team
Priority: normal Milestone:
Component: Core Webstart Version:
Keywords: Cc:

Description

Hi! I'm willing if you can update your .jnlp file, in order to be able to tell the operating system that .osm and .osm.gz files should be opened with JOSM. This is achieved using the "association" element in the .jnlp file.
Here is an example: https://stackoverflow.com/questions/2878914/jnlp-file-association-how-do-i-open-the-file-which-was-double-clicked-on

Attachments (0)

Change History (2)

comment:1 by taylor.smock, 2 years ago

Milestone: 22.09

It looks like this should be fairly easy to do.

  • native/josm.jnlp

     
    1111        <icon href="https://josm.openstreetmap.de/logo.png" width="256" height="256"/>
    1212        <icon href="https://josm.openstreetmap.de/logo64.png" width="64" height="64" kind="shortcut"/>
    1313        <offline-allowed/>
     14        <association mime-type="application/geo+json" extensions="geojson"/>
     15        <association mime-type="application/gpx+xml" extensions="gpx"/>
     16        <association mime-type="application/gzip" extensions="osm.gz"/>
     17        <association mime-type="application/vnd.openstreetmap.data+xml" extensions="osm"/>
     18        <association mime-type="application/x-bzip2" extensions="osm.bz2"/>
     19        <association mime-type="application/x-josm-session+xml" extensions="jos"/>
     20        <association mime-type="application/x-josm-session+zip" extensions="joz"/>
     21        <association mime-type="application/x-xz" extensions="osm.xz"/>
     22        <association mime-type="application/zip" extensions="osm.zip"/>
    1423        <shortcut>
    1524            <desktop/>
    1625            <menu/>

EDIT: It looks like the DTD doesn't like association.

Last edited 2 years ago by taylor.smock (previous) (diff)

comment:2 by taylor.smock, 2 years ago

Milestone: 22.09

This does not appear to work, unfortunately. Taking a look at the IcedTea (webstart) code (https://github.com/AdoptOpenJDK/IcedTea-Web), while they do parse the entries, they don't actually do anything with them. While it is technically very easy to add the association data, I'm not going to since the syntax for extensions is kind of unclear. Is it just the bare extension (osm), the extension plus the dot (.osm), or a regex (.*.osm). The samples I've seen are more of a regex (*.osm), but without the implementation being there, I don't want to commit something, and have people assume it works when it doesn't.

Note: I don't particularly care about Oracle Webstart (Java 8), as we are planning on moving to Java 11+ (see #17858).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to lucumon.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


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