0

Currently I m running a component (IBM WTX tool) from Java using the jars provided by IBM. In the WTX component I am connecting to a oracle database using tns connect identifier. While the running the component independently the tool picks up the tnsnames.ora of the oracle driver installed in my system and it works fine. But when running the same component from Java it could not resolve the tnsname and fails. Do we need to do any additional setup in Java Side?

I tried System.setProperty("oracle.net.tns_admin",""). But It didn't work.

Can anyone help on the issue?

Regards,

Joshua
  • 3
  • 1

1 Answers1

0

TNS_ADMIN must be set in the environment before the Java process is started. I don't think it can be set from within Java - or at least I haven't seen it done successfully before. Typically I have see this set from a shell script that also launches the Java program.

pmdba
  • 6,457
  • 2
  • 6
  • 16