Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC jar file issue (Mac)

 
Ekta Shah
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi im new to mac and am not able to understand where the mysql is loaded... i know it is coz im able to use it from the terminal. 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... the command i used was "echo $path" ... it just gave me a blank line.... please help...

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ekta Shah
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your tips but i am new to java as well... so not able to figure this out.... if you can guide would really appreciate it...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you need a JDBC tutorial.

If you've already go the DB running on your Mac, connecting to it from a Java program will be the same as from any other system.
 
Ekta Shah
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK!! Thanks any ways....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the link to Sun's JDBC Tutorial.
 
Ekta Shah
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic