Welcome to the Ranch.
A few pointers to help you make the most of JavaRanch as a resource...
Ekta Shah wrote:i know it is coz im able to use it from the terminal.
Please use real words when posting to the forums. Abbreviations such as "coz" in place of "because" only serve to make your posts more difficult to read and less likely to generate useful responses.
Please
read this for more information.
I am trying to write a simple java code to check the jdbc. but was not able to see the class path or the path on the terminal
Why is that necessary? To access a database with JDBC you use the JDBC URL of the DB. And that is the exact same on a Mac as it is anywhere else.
the command i used was "echo $path"
As I said, knowing the path isn't necessary, but when you do want to see what the PATH environment variable is set to, you must spell it correctly.