Forum Stats

  • 3,727,516 Users
  • 2,245,399 Discussions
  • 7,852,844 Comments

Discussions

JAVA_TOOL_OPTIONS incorrectly picked up

user8632123
user8632123 Member Posts: 120 Blue Ribbon

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

Sign In or Register to comment.