RFR  Need a way to suppress message when picking up JAVA_TOOL_OPTIONS
dmitry.samersoff at oracle.com
Tue Apr 8 21:31:14 UTC 2014
As this option allows silently alter a class path it's ever more
dangerous than providing a key to suppress warning.
I would prefer not to have these changes. Sorry!
On 2014-04-08 21:59, Ivan Gerasimov wrote:
> On 08.04.2014 21:16, Daniel D. Daugherty wrote:
>> > This variable is not meant to be documented.
>> > We will only suggest it to the users which need to get rid of the
>> > warning and complain about it.
>> Given that the code you are changing is in the OpenJDK code base,
>> not documenting the new _QUIET_JAVA_OPTIONS environment variable
>> doesn't have a whole lot of meaning. It will be visible to anyone
>> that has access to Google.
> Yes, of course.
> I only meant that it's not going to become the recommended way to pass
> options with an environment variable.
> It will only be suggested to the users who really need it.
> Sincerely yours,
>> On 4/8/14 2:30 AM, Ivan Gerasimov wrote:
>>> Hi everyone!
>>> That's the second round.
>>> First, here are a few thoughts about the issue:
>>> - When a console application is created, the user expects its output
>>> (both stdout and stderr) to be predictable.
>>> If I created a 'hello world' program, I would expect it to print only
>>> what it's supposed to print, but nothing more.
>>> - The runtime should not intermix its output with the program output,
>>> unless it is specifically told to do that.
>>> In the documentation , it's not written that using
>>> JAVA_TOOL_OPTIONS environment variable will make the runtime produce
>>> warnings in the application stderr.
>>> - It is already specified, that in the cases when it might be unsafe
>>> to pick up the options from the environment variable, the runtime
>>> does not process them.
>>> Here's the extract from : "Platforms may disable this feature in
>>> cases where security is a concern."
>>> I totally agree that with JEP-158 implemented, this warning message
>>> should definitely appear in the application logs.
>>> It would always be useful it the logs, but not always is it useful in
>>> the application stderr, because it can make the application caller
>>> unnecessary complicated.
>>> I changed the fix to implement an alternative environment variable,
>>> _QUIET_JAVA_OPTIONS, which behaves in the same way _JAVA_OPTIONS
>>> does, but does not produce the warning message.
>>> The change is quiet simple and does not change the current behavior
>>> of JAVA_TOOL_OPTIONS or _JAVA_OPTIONS variables.
>>> This variable is not meant to be documented.
>>> We will only suggest it to the users which need to get rid of the
>>> warning and complain about it.
>>> Would you please help review the new webrev:
>>> Sincerely yours,
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the hotspot-dev