Minor thoughts (Re: [External] : Re: JEP draft: Prepare to Restrict The Use of JNI

Peter Tribble peter.tribble at gmail.com
Wed Sep 6 15:34:41 UTC 2023


On Wed, Sep 6, 2023 at 10:39 AM Ron Pressler <ron.pressler at oracle.com>
wrote:

>
>
> > On 5 Sep 2023, at 15:48, Peter Tribble <peter.tribble at gmail.com> wrote:
> >
> >
> > That would be a pretty normal scenario.
> >
> > A new version of the Java runtime could be pushed to a user by:
> >
> > * The OS vendor, in a patch or update
> > * If in an organization, by the organization's IT department
> > * Ditto by an organization's security team
> > * Installation of a different application that updates Java as a
> side-effect
>
> Sorry, I don’t understand. How *exactly* is your application launched so
> that it would use a different Java runtime when one was installed?
>

Generally, my own applications simply call "java", so it gets whatever java
happens to come
first in the PATH. Most of the other applications I've seen do the same;
some pick up on
JAVA_HOME. (And there's the strange thing about default_java on a Mac which
I've seen
cause entertainment.)


> By the way, we also speculate about how different users do different
> things. When it comes to feedback it’s, therefore, best to limit things to
> what you yourself experience. One concrete example of something you
> experience is much more valuable to us than four examples of things you
> think others may experience.
>

There's no speculation involved. 30 years of being a systems administrator
gives you lots of
experience. The scenarios I mentioned are ones I've repeatedly encountered
in the field. (And
have stitched up java applications, to boot.)


> >
> > And probably a number of others. The point is that virtually none of us
> live in a
> > perfect idealized world; we generally have to work under the assumption
> that our
> > code could be used in a variety of different environments, including
> different java
> > versions, and that we have no control whatsoever.
> >
>
> True, and that is why people wanted — and rightly so — to allow
> applications to better pick a Java runtime and control it. So we’ve worked
> for years on that and delivered a feature that allows any Java application
> to pick a runtime and configure it as it wishes (jlink). These days, if an
> application has difficulty choosing or configuring its runtime, it’s by
> choice. If lack of control over the runtime poses a problem for your
> application, why are you choosing not to control the runtime?
>
> — Ron


It's not just my application; there are lots of other applications out
there that end up
being run. Which means that what I can and cannot do is immaterial - it's
what all the
other people developing and distributing java applications choose to do.
And mostly,
they don't do much - using jlink is extremely rare in the real world.

There appears to be a considerable disconnect between the idealized world
you're
envisioning, one in which the JEP makes absolute sense, and the harsh
reality of
what happens in the chaotic, indeed anarchic, wider world.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jdk-dev/attachments/20230906/ad88770d/attachment.htm>


More information about the jdk-dev mailing list