Running the JVM under a different z/OS code page

Java™ files for z/OS® are shipped in only one version: EN_US. To run the JVM under a different locale, convert all the text files in your Java installation from the default (IBM-1047) to your code page.

The jdkconv utility converts text files to a local encoding. The utility might be helpful if you get error messages about an invalid format for text files. To check if your code page setting might be the cause of the problem, find which locale you are using by checking the environment variables LANG or LC_ALL. If the locale value is not C or EN_US then you might see the invalid format message.

To convert your Java installation to a different code page, use the jdkconv utility. The utility requires a tool called cpmod, which is also provided in your Java installation.

  1. Make a copy of your Java installation directory. The reason is that the script overwrites files in the Java installation directory. If you want to undo the changes, you must either reinstall Java, or restore your copy of the directory.
  2. The jdkconv utility itself is shipped in code page IBM-1047. Before you run the utility, convert it to your code page as follows:
    cp -p jdkconv jdkconv.backup
    iconv -f IBM-1047 -t CODEPAGE jdkconv.backup >jdkconv
    chmod 755 jdkconv
    In this command sequence, replace CODEPAGE with your code page.
  3. Ensure that the directory containing both jdkconv and cpmod is in your PATH setting.
  4. Run jdkconv as follows:
    jdkconv CODEPAGE JAVATREE
    In this command, CODEPAGE is your code page, and JAVATREE is your Java installation directory.

After running the jdkconv utility, test the changes by running a Java application that is sensitive to the system locale.