IBM Support

Java JZOS warning message: "JVMJZBL2999W Could not set current directory to: <dir>"

Troubleshooting


Problem

A Java™ process that is started from z/OS® JCL by the JZOS batch launcher prints the following warning message in the job log:
JVMJZBL2999W Could not set current directory to: <dir>
The <dir> value might be blank.

Cause

The JZOS batch launcher runs the Unix script that you supply in the STDENV DD section of the JCL that starts the job. This script sets up the Unix environment variables for the Java program to start. After the Unix script completes, the JZOS batch launcher attempts to set the current working directory to the directory name that is indicated by the PWD environment variable. If the directory change is not possible for any reason, the JZOS launcher prints the warning.
The default PWD value is the Unix home directory for the user ID that starts the job. The directory name in the warning message might be blank if the home directory is not set, or if the home directory does not exist.

Environment

Java applications on z/OS, running the JZOS batch launcher in a z/OS JCL job.

Diagnosing The Problem

If you enable the JZOS launcher trace with parameter LOGLVL='+T', you might also see the following messages:
 JVMJZBL1006I PWD = <dir>
 JVMJZBL2999T Setting current working dir to: "<dir>"
 JVMJZBL2999W Could not set current directory to: <dir>
The <dir> value might be a directory path, but it might be blank.
 

Resolving The Problem

Verify these points and correct if necessary:
  • The user's home directory in the user's RACF OMVS profile is specified and not blank.
  • The user's home directory is specified as a full path name.
  • The user's home directory exists in the file system.
  • The user's home directory is part of a file system that is mounted.
  • The user's home directory is accessible to the user. Set the Unix permissions on the home directory to read, write, and execute permission for the user. For a Unix directory, execute permission is needed to allow a user to change to the directory.
  • If the STDENV script explicitly changes to a directory or sets the PWD environment variable, ensure that the directory exists and the user has access.
For reference, you can view the RACF OMVS profile for a z/OS user with the TSO command: LISTUSER <userid> OMVS. At the end of the output, look for the OMVS INFORMATION section, for example:
OMVS INFORMATION  
----------------  
UID= 0000001234
HOME= /u/userid 

PROGRAM= /bin/sh  

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB36","label":"IBM Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"ARM Category":[],"Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"8.0.0"},{"Type":"MASTER","Line of Business":{"code":"LOB56","label":"Z HW"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSW9CXR","label":"IBM Semeru Runtime Certified Edition for z\/OS"},"ARM Category":[{"code":"a8m0z0000001g85AAA","label":"SDK Java Technology on z\/OS"}],"Platform":[{"code":"PF035","label":"z\/OS"}],"Version":"11.0.0"}]

Document Information

Modified date:
07 June 2023

UID

ibm17001659