its oputput is below:=
welcome to the world of database
class not loaded
No suitable driver found for jdbc:postgresql//localhost:2345/my_first_databse
however in eclipse i have deployed the required jar file in project, and with same properties i am able connect the database perspective >databasedevelopment> but i can not use this connection in java programme.
I think you need another colon inbetween postgresql and //. It's not a valid connection string without that.
The error message is deceptive - it seems to imply you're missing the driver, when really it's usually a bad connection string that causes this error.
JDBC URLs are in the form "protocol:driver:host path-and-options". So "jdbc:postgresql://localhost/database". Port 2345 is the default used by the driver, so you only really need it when you are talking to a different port.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
Try Free Java/.NET Libraries for Word Excel PowerPoint and PDF