× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I always set Java properties on a per-job basis, since in the past I've broken IBM code by setting system-wide defaults.



-----Original Message-----
From: Pete Helgren [mailto:pete@xxxxxxxxxx]
Sent: Monday, May 22, 2017 1:21 PM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxx>
Subject: Re: JDBCR4 Exception in thread "main

And I'd start with a CL call that sets up the environment for you rather than relying on system settings (Example from an old POI CL call):

ADDENVVAR ENVVAR(CLASSPATH) +
VALUE('/Java/poi-3.6/poi-3.6-20091214.jar:/Java/poi-3.6/po
ml-3.6-20091214.jar:/Java/poi-3.6/poi-ooxml-schemas-3.6-20
4.jar:/Java/dom4j/dom4j-1.6.1.jar:/Java/xmlbeans/jsr173_1.
.jar:/Java/xmlbeans/xbean.jar') LEVEL(*JOB) REPLACE(*YES)

ADDENVVAR ENVVAR(QIBM_RPG_JAVA_PROPERTIES) +
VALUE('-Djava.awt.headless=true;-Dos400.awt.native=true;')
REPLACE(*YES)

ADDENVVAR ENVVAR(JAVA_HOME) +
VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk60/32bit') +
REPLACE(*YES)

You control everything ! That way changes to your system or even your profile won't affect programs that you successfully have running.....


Pete Helgren
www.petesworkshop.com
GIAC Secure Software Programmer-Java
Twitter - Sys_i_Geek IBM_i_Geek



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.