OpenStreetMap

Microsoft now offers openjdk which is 64 bit and JOSM runs quite nicely.

https://www.microsoft.com/openjdk

Comment from PierZen on 13 April 2021 at 13:03

Hi John,

Could you document how easy to install ? If we already have jdk installed, is the download / installation simply replace it ?

Comment from Johnwhelan on 13 April 2021 at 13:14

There is a choice of operating systems so the install will vary by operating system. Under Windows ten there is an .msi file microsoft-jdk-11.0.10.9-windows-x64.msi which installs and offers you the option to make Microsoft OpenJDK the default for .java files.

Very easy to do.

Comment from spiregrain on 13 April 2021 at 13:59

Do you know if it has Java FX-support, needed for the Bing Streetside plugin on Linux?

Comment from Johnwhelan on 13 April 2021 at 14:31

Sorry I don’t run Linux I’m afraid.

Comment from SomeoneElse on 13 April 2021 at 21:22

(re JOSM on flash) - when I saw that I thought someone had managed to create a JVM that just depends on Macromedia/Adobe Flash (now developed by Harman, part of Samsung)!

Comment from Johnwhelan on 13 April 2021 at 22:07

Running JAVA on some corporate machines breaks company policy.

Oracle has changed the licensing on JAVA and I used to deal with Oracle on licensing matters professionally. Their interpretation of their licenses seemed to vary depending who you speak to. Several times I’ve have to refer them back to previous conversations where the interpretation of the license when it was purchased was not the same as the person I was talking to was saying.

I think Microsoft’s offering of OpenJDK which replaces JAVA avoids both these problems. Running it from a flash drive doesn’t really avoid the problems above. Do the problems matter? If you’re running a mapathon and some people bring their company laptop being able to use the JOSM buildings_tool makes a big difference.

I’m not saying you must use it instead of Oracle’s JAVA or that it is better than any other opensource JDK but I merely bring your attention to the fact it exists. Note the other implication is JOSM is now totally independent on what Oracle decides to do and thus we don’t need to think about a possible replacement.

Subjectively JOSM seems to run a little faster as well but I haven’t built and run a formal benchmark.

Comment from mirror176 on 14 April 2021 at 01:16

Another solution is adoptopenjdk that seems to represent itself as a more prominent flow for future java releases and such.

Comment from Johnwhelan on 14 April 2021 at 02:04

I think you need to go back twenty five years to a time when Sun Microsystems were building computers that needed to have programs specially written for their hardware and that is the origin of JAVA. The promise was one program could run on many different hardware platforms and twenty five years ago there was a variety of hardware platforms. Today many have disappeared. Remember the Itanium or even Data General for that matter? Sun Microsystems has been taken over by Oracle and they have pointed out a number of security problems in early versions which pushes you into their latest version with it’s altered license.

Today computer hardware is dominated by the X86 processor so there isn’t quite the need for software that runs on any hardware. However there is still a lot of software written in JAVA and the cost of building an application such as JOSM is substantial. Can this be avoided.

As mentioned above there are a number of OpenJDK solutions available. The Microsoft version is only one but one that will have a very large user base and that means it should be solid. Someone else will find the undocumented system features (bugs). Provided JOSM is written or enhanced so that it can run under one or more then the investment in the code is safe. If it can only run under the Oracle version then you are at Oracle’s mercy as to the terms you can use the software.

I personally feel very comfortable with the Microsoft implementation but it is up to the JOSM programming team to write and enhance the code in such a way it can run under other OpenJDK solutions rather than be locked into an Oracle solution.

Comment from Glassman on 14 April 2021 at 19:25

@spiregrain the bing Streetside plugin doesn’t work on my linux. I’m running Fedora 33 with OpenJDK. I usually just open Bing in another window.

On the plugin repository, they state: “The MicrosoftStreetside plugin used JavaFX to implement the Streetside 360 degree viewer JavaFX, which, while bundled in the Oracle Java SE 1.8, is not an official part of the Java SE 1.8 specification, and may not function properly with alternative JDKs (e.g. OpenJDK is not currently supported). JavaFX is licensed under the same terms as Java SE.”

There is an open issue requesting support for JavaFX under OpenJDK.

Comment from spiregrain on 15 April 2021 at 08:38

@Glassman I think I’ve seen something like that - I’ve had no luck getting JFX implementations up and running on Fedora; at least not alongside HDPI scaling and Kendzi 3d working. So I’m always interested to try new JDKs. I’ll look at that support request, it might help me figure it all out.

Thanks!

Comment from SomeoneElse on 15 April 2021 at 20:42

I stumbled across this comment at HN today, allegedly from someone who works on OpenJDK.

Comment from karussell on 25 April 2021 at 15:23

Another solution is adoptopenjdk

I also recommend this over other solutions: https://adoptopenjdk.net/

You can easily download stable releases and early adopter versions. If you need a JDK for server-side you can also use this in your CI via install-jdk.sh: https://github.com/sormuras/bach

Comment from mdk on 27 April 2021 at 11:00

As far as I understood, JavaFX is also dropped by Oracle JDK since version 10. JavaFX is now a separate project called OpenJFX which based on the original code from JavaFX like OpenJDK based on the original Oracle code. And actually Oracle also uses the OpenJDK code.

For Ubuntu I find a description how to install and use OpenJFX:

First, install OpenJFX:

sudo apt install openjfx

You can then add these arguments to any java invocation:

--module-path /usr/share/openjfx/lib --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web

Comment from spiregrain on 27 April 2021 at 11:38

Hi mdk ,

Have you tried it, and does it work for you?

Asking because I have found many such descriptions and although some of them appear to work, none of them have yet provided me with a JOSM that can do Bing Streetside, Kendzi 3d and readably-sized UI text and readably-positioned UI text. I get two-out-of-four at best.

I’ve tried scores of JDKs in various versions, and Snap / Flatpak editions of JOSM too.

A new fedora is released today, so I hope for better from it.

Comment from mdk on 27 April 2021 at 20:00

Hi spiregrain,

you are right, I didn’t test it. When I add the MicrosoftStreeSide plugin, also the javafx-unixoid plugin is added. After restart from a terminal I see, that loading of the libgstreamer-lite.so fails, which exists in the .josm/plugins/javafx directory.

I open a new defect for this: https://josm.openstreetmap.de/ticket/20811

Comment from spiregrain on 28 April 2021 at 07:22

Morning mdk,

Thanks again for pursuing this; I’ve CC’d myself onto the de-duped ticket and upvoted it.


Login to leave a comment