aspose file tools*
The moose likes JDBC and the fly likes JDBC jar file issue (Mac) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "JDBC jar file issue (Mac)" Watch "JDBC jar file issue (Mac)" New topic
Author

JDBC jar file issue (Mac)

Ekta Shah
Greenhorn

Joined: Feb 02, 2010
Posts: 4
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

Joined: Jan 10, 2002
Posts: 60059
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ekta Shah
Greenhorn

Joined: Feb 02, 2010
Posts: 4
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

Joined: Jan 10, 2002
Posts: 60059
    
  65

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

Joined: Feb 02, 2010
Posts: 4
OK!! Thanks any ways....
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

Here's the link to Sun's JDBC Tutorial.
Ekta Shah
Greenhorn

Joined: Feb 02, 2010
Posts: 4
Thanks...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC jar file issue (Mac)
 
Similar Threads
Setting Java Path in Linux
how to set PATH (setenv) in Terminal (Im trying to setup Ant)
connecting to mysql, with java, on a mac
Enum Code from Bates/Sierra doesn't compile
how to open terminal window on mac