RE: Properties init: Could not determine current working
Richard Schoen <richard-DiTrGpQEJGItADg8e/3/[email protected]> Sat, 10 Jan 2026 18:19:00 +0000
| Newsgroups | gmane.comp.lang.as400.java |
|---|---|
| Message-ID | <CH0PR12MB5250821A067E5CD1DCB50B70B783A@CH0PR12MB5250.namprd12.prod.outlook.com> |
What about setting the class path and home dir env variables before calling= your RPG code ? That's usually what I've done, but I generally don't advocate calling Java = from RPG. = We had problems several years back at RJS and abandoned calling Java from R= PG. = Regards, Richard Schoen Web:=A0http://www.richardschoen.net Email:=A0richard-DiTrGpQEJGItADg8e/3/[email protected] -----Original Message----- Folks: I've got some java code, being invoked from RPG, that is failing in production. The same code, running on our development system. Both systems are 7.4 and have the same java 11 version installed. The RPG code sets the classpath & java_home env variables (using java 11). The job is receiving a MCH74A5 with reason code 2. This indicates that the program ran System.exit with a non-zero exit code. My code does not use System.exit. The error occurs when the RPG code is invoking the java classes constructor, which does absolutely nothing (empty constructor). At the same time that this failure happens, a QPRINT spool file is created for the user that contains this: Exception in thread "main" java/lang/Error: Properties init: Could not determine current working directory. at java/lang/System.initProperties (java.base@11/NativeMethod:4294967295) at java/lang/System.ensureProperties (java.base@11/System.java:417) -- = This is the Java Programming on and around the IBM i (JAVA400-L) mailing li= st To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org Before posting, please take a moment to review the archives at https://archive.midrange.com/java400-l.