Modify

Opened 7 weeks ago

Closed 4 weeks ago

Last modified 4 weeks ago

#17278 closed defect (fixed)

JOSM.app reports "Unable to load Java Runtime Environment" on mac os

Reported by: anonymous Owned by: team
Priority: normal Milestone: 19.02
Component: Installer MacOS Version:
Keywords: homebrew macos java11 Cc:

Description

On mac os 10.11 El Capitan installed JOSM.app version 14620 via homebrew. Clicking on JOSM.app result in "Unable to load Java Runtime Environment." message, while the following command line runs fine
java -jar /Applications/JOSM.app/Contents/Java/josm-snapshot-14620.jar

~$ java --version
openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

Attachments (1)

josm-custom-macosx.zip (12.7 MB) - added by Don-vip 5 weeks ago.

Change History (16)

comment:1 Changed 6 weeks ago by sam.james.parkinson@…

I'm also getting the same issue.

macOS 10.14.2

java openjdk 11.0.2

Have installed JOSM today using brew. Tried opening JOSM which reported the java error, so have installed java using brew too, but still get the error.

Last edited 5 weeks ago by Don-vip (previous) (diff)

comment:2 Changed 5 weeks ago by Don-vip

Component: CoreInstaller MacOS
Keywords: homebrew added

comment:3 Changed 5 weeks ago by Don-vip

I don't have any mac nor I know what homebrew does, neither who created this stuff. I cannot analyze the issue and have no idea if we should do something. Can you please investigate? Only a macOS user can solve this kind of stuff.

Last edited 5 weeks ago by Don-vip (previous) (diff)

comment:4 Changed 5 weeks ago by sam.james.parkinson@…

It's mentioned as a method of installation at https://josm.openstreetmap.de/wiki/Download#brew.

https://github.com/Homebrew/homebrew-cask-versions/blob/master/Casks/josm-latest.rb looks to be the install script that is run.

Could it be related to us both only having JDK11. After installing JDK8 it works just fine of course!

I'll open a pull request to update the cask to include a caveat that JSOM.app requires JDK8 to be installed.

The install instructions could also be updated to include...

$ brew tap homebrew/cask-versions
$ brew cask install java8

comment:5 Changed 5 weeks ago by sam.james.parkinson@…

See https://github.com/Homebrew/homebrew-cask/pull/58808, which should help highlight this dependency once merged.

comment:6 Changed 5 weeks ago by Don-vip

Ah, maybe this is unrelated to brew but we need to update the library that generates the .app file. JOSM is compatible with Java 11, this is only a packaging issue.

Changed 5 weeks ago by Don-vip

Attachment: josm-custom-macosx.zip added

comment:7 Changed 5 weeks ago by Don-vip

comment:8 Changed 4 weeks ago by anonymous

Works a treat.

https://i.imgur.com/DwitY2u.png

Last edited 4 weeks ago by Hb--- (previous) (diff)

comment:9 in reply to:  8 Changed 4 weeks ago by sam.james.parkinson@…

Comment 8 was from me.

Replying to anonymous:

Works a treat.

comment:10 Changed 4 weeks ago by Hb---

Keywords: macos added

comment:11 Changed 4 weeks ago by Hb---

Keywords: java11 added

comment:12 Changed 4 weeks ago by Don-vip

Milestone: 19.02

comment:13 Changed 4 weeks ago by Don-vip

Resolution: fixed
Status: newclosed

In 14793/josm:

fix #17278 - update macOS appbundler to https://mvnrepository.com/artifact/com.panayotis/appbundler/1.1.0 for Java 9+ compatibility

comment:14 Changed 4 weeks ago by Hb---

Is JOSM incompatible with Java 8 on Mac after this fix?

comment:15 Changed 4 weeks ago by anonymous

Seems okay.

Uninstalled Java 11, and installed Java 8 again with brew.

brew cask zap java
brew cask install java8

https://i.imgur.com/xeP7JbH.png

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.