I have the answer from the JAVA400-L. It is that the JAVA_OPTS does not work for what I want. I changed it to IBM_JAVA_OPTIONS and all worked.
Thank you for your response.
P.S I do already have a Async option which can be switched on and off as required.
From: D*B <dieter.bender@xxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Sent: Thursday, 15 May 2014, 8:10
Subject: Re: IBM i 7.1 IT4J: JAVA_OPTS
... the envvar has to be set before the JVM is started and the JVM is started only once in a job. You would win speed and use less resources and full control for JVM settings, using an asynchronous approach and for calling java main routines my open source command runjavarun (available at sourceforge project appserver4rpg) could do this for you.
-- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives