Manifest Add-Exports vs. command line --add-exports
tom.w.hood at gmail.com
Wed Aug 23 21:24:38 UTC 2017
On Wed, Aug 23, 2017 at 6:36 AM, Alan Bateman <Alan.Bateman at oracle.com>
> On 22/08/2017 01:49, Tom Hood wrote:
>> Thanks, Mandy. I was beginning to think my followup question might have
>> gotten lost and I was considering a new post.
>> I'm unable to get --illegal-access=permits to work for our webstart app by
>> setting it in the Java Control Panel with the 9+181 build. It appears
>> webstart crashes when I do this. I tried enabling tracing & logging from
>> the Java Control Panel "Advanced" tab, but couldn't find anything left
> The value is "permit" (not "permits"). Just mentioning in case this is a
> simple typo here. Also it would be good to confirm that that "crashes"
> means it aborts with an error message rather than a hard crash.
Thanks. It was just the typo you pointed out.
I attempted to launch our app from firefox and didn't get any feedback with
the typo there. I didn't try running javaws from the command line. Maybe
it outputs something informative in that case.
>> Setting a long list of --add-exports in the Java Control Panel *does* work
>> for our webstart app with the 9+181 build. However, I don't believe this
>> is going to work for our customer who has 1000's of geographically
>> distributed users. We have next to zero control over how/when system
>> administrators perform the java installations. Likewise, asking all those
>> users to manually add the options themselves is too much to ask of them.
>> predict many complaints and calls to our help desk that our app doesn't
>> work with Java 9.
>> Any chance of adding a more webstart-friendly "JEP260 last resort" for
>> 9 ? Our vendors need more time to remove dependencies from their
>> libraries. I'm concerned that as we proceed in testing our app with Java
>> that the list of JEP260-override options will grow. For example, the
>> --add-opens was added due to an illegal setAccessible(true) reflection
> The CLI options to export or open packages can be specified in JNLP file,
> you shouldn't need to ask user to add them via the control panel. You can
> predicate on the Java SE version too, i.e.
> <j2se version="9+" java-vm-args="--add-opens=..." />
The issue is the limit on the *number* of args we can have in the
java-vm-args. If you exceed the limit, the webstart app fails to launch
and displays a popup window with the text "too many args to run".
We need so many --add-exports and --add-opens that it's possible we won't
be able to fit them all in there. At the moment, we are just under the
limit and I'm hoping further testing of our app doesn't push us over the
edge by revealing more --add-opens, for example.
I can't shrink the list of args by using --illegal-access=permit, because
that is disallowed in the jnlp. I think I saw some correspondence from you
indicating you intentionally wanted the jnlp to explicitly list what was
needed. Unfortunately, that won't work if you have too many to list.
Any chance you could change Java 9 to allow --illegal-access=permit in the
jnlp or alternatively increase the number of args allowed?
> Have you submitted bugs to the JAI project about its usages of sun.* APIs?
No I haven't and I'm not sure how, although I didn't try to find a link to
submit bugs to it.
I'm getting the impression the JAI plugin for ImageIO was taken over by
https://github.com/jai-imageio/jai-imageio-core. I was about to give that
one a try instead of the one I got from Oracle: http://www.oracle.com/
If you know I'm headed in the wrong direction with that, please let me know.
More information about the core-libs-dev