Re: Properties init: Could not determine current working directory.

Marco Facchinetti <marco.facchinetti-kthxv0ud/[email protected]> Fri, 9 Jan 2026 20:01:11 +0100
Newsgroups gmane.comp.lang.as400.java
Message-ID <CAMsgu4qg6s4DoeOE_UPs8vPtn69ZfNz3BW430mRBXk1qW2=KTw@mail.gmail.com>
Hi David, this is my check list when I got problems with Java:

Make sure that *PUBLIC has at least *RX authority to the following
directory paths:
/QIBM/ProdData/OS400/Java400/
/QIBM/ProdData/OS400/Java400/ext
/QIBM/ProdData/OS400/Java400/jdk/lib/
/QIBM/ProdData/OS400/Java400/jdk/lib/ext/
/QIBM/ProdData/Java400/jdk11/lib/ext/
/QIBM/UserData/Java400/ext/

QIBM_MULTI_THREADED = 'Y'

/QOpenSys/QIBM/ProdData/JavaVM/jdk17/64bit/conf/security/java.policy

Is there a possibility that the JVM was already in error before the Java
class was executed in your RPG?

HTH
--
Marco Facchinetti

Mr S.r.l.

Tel. 035 962885
Cel. 393 9620498

Skype: facchinettimarco


Il giorno ven 9 gen 2026 alle ore 17:27 David Gibbs via JAVA400-L <
[email protected]> ha scritto:

> 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)
>
>  at java/lang/System.afterClinitInitialization (java.base@11
> /System.java:220)
>
>  at java/lang/Thread.initialize (java.base@11/Thread.java:375)
>
>  at java/lang/Thread.<init> (java.base@11/Thread.java:162)
>
> Unable to create Java Virtual Machine.
>
>
> Anyone know where the current working directory for a job would be set?  Is
> it a job description setting (I couldn't find anything there)?  Subsystem
> description?  User profile?
>
> The user profile DOES have a home directory set, but that directory doesn't
> exist.  However, the same is true for our development system.
>
> Any ideas where to look next?
>
> Thanks!
>
> david
> --
> IBM i on Power Systems: For when you can't afford to be out of business!
> --
> This is the Java Programming on and around the IBM i (JAVA400-L) mailing
> list
> 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.
>
-- 
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
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.