Sourcing java on JOSM build for OSX

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sourcing java on JOSM build for OSX

Marc Grober
I am currently running High Sierra and JDK 12. I have been trying to
identify how to get the JOSM (latest-tested) OSX build
(https://josm.openstreetmap.de/download/macosx/josm-macosx.zip) to
source JDK 12 as opposed to using the JRE identified by the Java Panel
(which is the now defunct "internet plugin"). I have run the jar that
comes in the package, and I have also replaced that jar with
latest-tested downlaoded directly, with no change in behavior if I run
from Applications. If I run from command line, JOSM sources the java set
in JAVA_HOME.

I have been unable to find anything that identifies whether any of the
OSX files (like info.plist) or JOSM settings provide the option to set
how JOSM sources Java, and JOSM does not source JAVA_HOME if started
from Applications.

I can't tell whether the current state of affairs is a feature, a bug,
or simply an artifact of my own ignorance.

But, I am guessing that more and more OSX users will be confronting the
same problem, and it may get worse as I have heard that Apple will be
eliminating the Java Panel and plugin location in new version of the OS.

Since JOSM works just fine if invoked from CLI, I have to assume that
something in Contents is pointing JOSM to the Internet plugin, instead
of to JAVA_HOME.

Can someone tell me how, where one can find and adjust this, and perhaps
this could be modified in the OSX build to first look to see if
JAVA_HOME is set, and then use Java from there?

--
"There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy. "



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Sourcing java on JOSM build for OSX

Vincent Privat
Hi Marc,
JOSM bundle for macOS is currently built using this fork of "appbundler":
https://github.com/teras/appbundler

It seems the launcher doesn't care about JAVA_HOME but chooses explicitely
JavaAppletPlugin by default:
https://github.com/teras/appbundler/blob/master/appbundler/native/main.m#L57

It should be reported and fixed there, until we can switch to the new
"jpackager" tool that will appear soon in OpenJDK itself:
https://bugs.openjdk.java.net/browse/JDK-8200758

Cheers,
Vincent

Le jeu. 13 juin 2019 à 22:47, Marc Grober <[hidden email]> a écrit :

> I am currently running High Sierra and JDK 12. I have been trying to
> identify how to get the JOSM (latest-tested) OSX build
> (https://josm.openstreetmap.de/download/macosx/josm-macosx.zip) to
> source JDK 12 as opposed to using the JRE identified by the Java Panel
> (which is the now defunct "internet plugin"). I have run the jar that
> comes in the package, and I have also replaced that jar with
> latest-tested downlaoded directly, with no change in behavior if I run
> from Applications. If I run from command line, JOSM sources the java set
> in JAVA_HOME.
>
> I have been unable to find anything that identifies whether any of the
> OSX files (like info.plist) or JOSM settings provide the option to set
> how JOSM sources Java, and JOSM does not source JAVA_HOME if started
> from Applications.
>
> I can't tell whether the current state of affairs is a feature, a bug,
> or simply an artifact of my own ignorance.
>
> But, I am guessing that more and more OSX users will be confronting the
> same problem, and it may get worse as I have heard that Apple will be
> eliminating the Java Panel and plugin location in new version of the OS.
>
> Since JOSM works just fine if invoked from CLI, I have to assume that
> something in Contents is pointing JOSM to the Internet plugin, instead
> of to JAVA_HOME.
>
> Can someone tell me how, where one can find and adjust this, and perhaps
> this could be modified in the OSX build to first look to see if
> JAVA_HOME is set, and then use Java from there?
>
> --
> "There are more things in heaven and earth, Horatio,
> Than are dreamt of in your philosophy. "
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Sourcing java on JOSM build for OSX

Marc Grober
Thank you, Vincent.

I created a new issue in github.
Is there any place else that the issue needs to be reported?

Will a change in the reference to JAVA_HOME suffice, or will a new JRE
have to be bundled a la  http://www.balthisar.com/blog/bundle_the_jre/ ?

On 6/16/19 7:46 AM, Vincent Privat wrote:

> Hi Marc,
> JOSM bundle for macOS is currently built using this fork of "appbundler":
> https://github.com/teras/appbundler
>
> It seems the launcher doesn't care about JAVA_HOME but chooses
> explicitely JavaAppletPlugin by default:
> https://github.com/teras/appbundler/blob/master/appbundler/native/main.m#L57
>
> It should be reported and fixed there, until we can switch to the new
> "jpackager" tool that will appear soon in OpenJDK itself:
> https://bugs.openjdk.java.net/browse/JDK-8200758
>
> Cheers,
> Vincent
>
> Le jeu. 13 juin 2019 à 22:47, Marc Grober <[hidden email]
> <mailto:[hidden email]>> a écrit :
>
>     I am currently running High Sierra and JDK 12. I have been trying to
>     identify how to get the JOSM (latest-tested) OSX build
>     (https://josm.openstreetmap.de/download/macosx/josm-macosx.zip) to
>     source JDK 12 as opposed to using the JRE identified by the Java Panel
>     (which is the now defunct "internet plugin"). I have run the jar that
>     comes in the package, and I have also replaced that jar with
>     latest-tested downlaoded directly, with no change in behavior if I run
>     from Applications. If I run from command line, JOSM sources the
>     java set
>     in JAVA_HOME.
>
>     I have been unable to find anything that identifies whether any of the
>     OSX files (like info.plist) or JOSM settings provide the option to set
>     how JOSM sources Java, and JOSM does not source JAVA_HOME if started
>     from Applications.
>
>     I can't tell whether the current state of affairs is a feature, a bug,
>     or simply an artifact of my own ignorance.
>
>     But, I am guessing that more and more OSX users will be
>     confronting the
>     same problem, and it may get worse as I have heard that Apple will be
>     eliminating the Java Panel and plugin location in new version of
>     the OS.
>
>     Since JOSM works just fine if invoked from CLI, I have to assume that
>     something in Contents is pointing JOSM to the Internet plugin, instead
>     of to JAVA_HOME.
>
>     Can someone tell me how, where one can find and adjust this, and
>     perhaps
>     this could be modified in the OSX build to first look to see if
>     JAVA_HOME is set, and then use Java from there?
>
>     --
>     "There are more things in heaven and earth, Horatio,
>     Than are dreamt of in your philosophy. "
>
>
--
"There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy. "


smime.p7s (3K) Download Attachment