SQLcl is a Java application. The Oracle Java Virtual Machine (JVM) and JDBC driver looks at your Operating System to determine things like what language should be used for your user interface and your NLS_LANG setting for your Oracle session.

But.

Many of you like to keep your OS in your native language, but reserve your development tools to English.

So, without forcing your email, browser ,and everything else on your machine to a different language, how do I tell SQLcl to use the language I want?

In Oracle SQL Developer, you’d add this line to your sqldeveloper.conf or product.conf file:

AddVMOption -Duser.language=en

Then, even if your OS was setup for Simplified Chinese or Portuguese, your SQL Developer user interface would be in English.

However, there is no sqlcl.conf – we have a compiled binary you can run.

So, if you want to set any JVM flag for your instance of SQLcl, you can set this Environment Variable.

JAVA_TOOL_OPTIONS

SQLcl in Spanish

There are hundreds of languages supported in general, but for our database tools, we support 9.

English, Portuguese, Italian, Spanish, French, Simplified Chinese, Japanese, and Korean. You can find the codes for these here.

I can tell you that the language code for Spanish is ‘es’

To send that to SQLcl, we’re going to use a session environment variable.

So in Windows –

c:\SQLDev\sqlcl\20.2\sqlcl\bin>SET JAVA_TOOL_OPTIONS=-Duser.language=es
c:\SQLDev\sqlcl\20.2\sqlcl\bin>sql hr/oracle
Picked up JAVA_TOOL_OPTIONS: -Duser.language=es
SQLcl: Versi≤n 20.2 Production en mar. ago. 25 15:37:58 2020
Copyright (c) 1982, 2020, Oracle. Todos los derechos reservados.
Last Successful login time: Mar Ago 25 2020 15:38:01 -04:00
Conectado a:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

Se ha encontrado login.sql en el CWD. El acceso a la DB estß restringido para login.sql.
Ajuste SQLPATH para incluir la ruta y activar la funcionalidad completa.
SQL>

Error messages will come back in Spanish as well.

Mi espanol is muy malo.

Setting other JVM flags

Let’s say for…REASONS…you need to increase the amount of memory avilable to SQLcl versus what you get by default.

JVisualVM shows me what’s going on for any Java program running on my machine. I can also use it to see any JVM arguments that have been set.

Show Java does just that. I’ve also got Java VisualVM to show me what’s what for my program.

Ok, now let’s startup SQLcl again, but this time with

c:\SQLDev\sqlcl\20.2\sqlcl\bin>SET JAVA_TOOL_OPTIONS=-Duser.language=fr -Xmx800m
c:\SQLDev\sqlcl\20.2\sqlcl\bin>sql hr/oracle
Picked up JAVA_TOOL_OPTIONS: -Duser.language=fr -Xmx800m
SQLcl : version 20.2 Production sur mar. ao√t 25 15:57:21 2020
Copyright (c) 1982, 2020, Oracle. Tous droits rΘservΘs....

We can see both -Duser.language and the -Xmx flags have been recognized.

I’m not saying SQLcl needs 800MB of memory, but in case you did…

Yes, this should be documented.

We have an awesome documentation team. They’ll be adding this content ASAP in the SQLcl Quick Reference Guide.

Author

I'm a Distinguished Product Manager at Oracle. My mission is to help you and your company be more efficient with our database tools.

3 Comments

  1. Guido Rolon Reply

    Hi, i find this post very usefull
    I’ve wondered if is there any option like SET JAVA_TOOL_OPTIONS=-Duser.language=es in order to change SQLcl files to another location
    I’m using this version
    SQLcl: Versi¾n 21.4 Production en sßb abr 02 09:44:51 2022
    By defaulkt it stores these files in
    %USERPROFILE%\AppData\Roaming\sqlcl\
    aliases.xml
    history.log
    history.xml

    Any changes to do that like in sqldeveloper.conf and datamodeler.conf ?

    AddVMOption -Dide.user.dir=../../.sqldeveloper
    AddVMOption -Dide.user.dir=../../.datamodeler

    Thanks in advance

  2. Hi Jeff

    there seem to be some problems with diacritics in your code examples ..
    ES: El acceso a la DB estß restringido
    FR: Tous droits rΘservΘs.
    and in some CMD-screenshots too ..

    Is it a problem of this HTML page (but not for the screenshots) or for your current computer (settings) or is it a basic problem?

    regards

    Peter2_1

    • it’s a problem of windows cmd prompt sucking

      you need to change the code page in Windows whereas in OS X it ‘just works’

Reply To Peter2_1 Cancel Reply