OpenLegacy H3270 Connector and the USER Directory
ā Why is my H3270 connector failing when launching the S3270 process?
The OpenLegacy H3270 connector uses the system's USER directory (i.e., the Java system property user.home) to launch the S3270 process. If your USER directory path contains spaces or special characters, the connector might fail to invoke the process properly.
ā
How can I fix this?
You can override the default user.home directory by setting the JAVA_TOOL_OPTIONS environment variable. This tells the JVM to use a different path for the user.home property.
š If you're using Command Prompt (cmd.exe):
cmd
set JAVA_TOOL_OPTIONS=-Duser.home="C:\\Your\\Custom\\Path"
This is temporary for the current session.
š If you're using PowerShell:
Again, this will apply only to the current shell session.
$env:JAVA_TOOL_OPTIONS = "-Duser.home=C:\\Your\\Custom\\Path"
š¦ What happens on the first run?
On the first invocation, the H3270 connector checks whether the s3270 executable exists in:
{user.home}/.openlegacy/.h3270
If it doesn't exist, the connector will extract it into that location automatically.
š Important:
Ensure that the Java process has write permissions to the path:
C:\Your\Custom\Path\.openlegacy\.h3270
Without write access, the extraction will fail and the connector won't work.
š Summary
Avoid spaces/special characters in the default USER directory.
Override it using JAVA_TOOL_OPTIONS.
Make sure the Java process can write to the target directory.
The connector will auto-extract the S3270 binary if not already present
Updated 2 days ago