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.
- 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.
- The jdkconv utility itself is shipped in code page IBM-1047. Before you run the utility, convert it to your code page as follows:
In this command sequence, replace CODEPAGE with your code page.cp -p jdkconv jdkconv.backup iconv -f IBM-1047 -t CODEPAGE jdkconv.backup >jdkconv chmod 755 jdkconv - Ensure that the directory containing both jdkconv and cpmod is in your PATH setting.
- Run jdkconv as follows:
In this command, CODEPAGE is your code page, and JAVATREE is your Java installation directory.jdkconv CODEPAGE JAVATREE
After running the jdkconv utility, test the changes by running a Java application that is sensitive to the system locale.