Postgres Blog Posts

Connecting Postgresql with Java

This article tells you how to connect the postgresql with java program. If we connect to the postgresql we can perform operations directly from the java program without doing the operations in postgresql.
Download Postresql Driver:
To connect to the Postgresql database server from a java , you need to have a Postgresql driver.
So download the driver with this link : https://jdbc.postgresql.org/download.html
The downloaded file is a jar file. You should copy it to a specific java program which you want to connect to the Postgresql server.
Connect to the PostgreSQL database server:
You create a New Java Project and add that driver with the following manner to your project

0 Likes 78 Views