Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find location of oracle_home from java

What would be the best way to find oracle home and tnsnames.ora from java? Actually i am trying to get a list of tns entries and display it in program combobox.

like image 890
dsmoljanovic Avatar asked Feb 03 '26 11:02

dsmoljanovic


1 Answers

There is no some automatic search. If you want Oracle's JDBC driver to use your tns names, you have to define system property (-D) oracle.net.tns_admin=<directory where tnsnames.ora is located>. I recommend setting it up so you can use it and ojdbc will be use it too (if needed)

like image 154
Op De Cirkel Avatar answered Feb 05 '26 09:02

Op De Cirkel