0

Trying to load sas.client.props file present in classpath

I have configuration inside resource/conf directory. I would like to send this file as argument to my program via JVM arguments -D.

This works:

-Dcom.ibm.SSL.ConfigURL=file:E:\inteliJworkspace\project1\target\classes\conf\ssl.client.props

File exists in resource dir: System.out.println(new Test().getClass().getResource("/conf/sas.client.props"));

But how can I send this /conf/sas.client.props from compiled classes directory relative path via JVM arguments?

This is not working:

-Dcom.ibm.CORBA.ConfigURL=conf\sas.client.props

JSAS0629E: [loadPropertiesFile] MalformedURLException reading com.ibm.CORBA.ConfigURL=file:/conf\sas.client.props. Exception: java.net.MalformedURLException: no protocol: conf\sas.client.props JSAS1478W: Security cannot be enabled because the ConfigURL property cannot be processed!

This is not working:

-Dcom.ibm.CORBA.ConfigURL=\conf\sas.client.props

JSAS0629E: [loadPropertiesFile] MalformedURLException reading com.ibm.CORBA.ConfigURL=file:/conf\sas.client.props. Exception: java.net.MalformedURLException: no protocol: \conf\sas.client.props JSAS1478W: Security cannot be enabled because the ConfigURL property cannot be processed!

I tried every option I could remember, but couldn't get it working!

Levijatanu
  • 371
  • 2
  • 17

1 Answers1

0

Windows: -Dcom.ibm.CORBA.ConfigURL="file:C:\IBM\WebSphere\AppClient\properties\sas.client.props"

AIX: -Dcom.ibm.CORBA.ConfigURL="file:/usr/IBM/WebSphere/AppClient/properties/sas.client.props"

Other UNIX: -Dcom.ibm.CORBA.ConfigURL="file:/opt/IBM/WebSphere/AppClient/properties/sas.client.props"

Thank, Ut Le

Ut Le
  • 21
  • 3