This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,823 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

JAVA_TOOL_OPTIONS incorrectly picked up

BG4GRAPH
BG4GRAPH Member Posts: 129 Bronze Badge

Hi everyone,

in order to get appropriate locale settings I try to configure sqlci by "set JAVA_TOOL_OPTIONS='-Duser.lang=de -Duser.country=DE -Duser.timezone=Europe/Berlin -Dfile.encoding=ISO-8859-1'". As expected sqlci responds by "Picked up JAVA_TOOL_OPTIONS: '-Duser.lang=de -Duser.country=DE -Duser.timezone=Europe/Berlin -Dfile.encoding=ISO-8859-1'". Not trusting things I prefer to check using the script

script

  var System  = Java.type("java.lang.System");

  System.out.println( System.getProperty("user.lang"));

  System.out.println( System.getProperty("user.language"));

  System.out.println(  System.getProperty("user.region"));

  System.out.println(  System.getProperty("user.country"));

  System.out.println(  System.getProperty("user.timezone"));

  System.out.println(  System.getProperty("file.encoding"));

/

The output is:

de -Duser.country=DE -Duser.timezone=Europe/Berlin -Dfile.encoding=ISO-8859-1

de

null

DE

Europe/Berlin

Cp1252

See what has happened? The various properties should have been broken along white space boundaries, but instead everything is pushed into user.lang. On the other hand file.encoding is definitely wrong.

I tried with java 1.8.0_261. I do have other jdks on my system, but sqlci seems to have her own ideas of which one to choose.

Can anything be done about the java options? I would be thankful for every idea.

Yours,

user8632123.

berx

Best Answer

Answers