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!