java.lang.ClassNotFoundException: org.postgresql.Driver [solved]

1. In this video I have shown how you can solve the error.

2. This error came for me on running the below java program in Eclipse IDE.

3. First download the postgres jar file from the official postgres site.

You can follow this link to download the jar.
https://jdbc.postgresql.org/download.html

4. Now add the jar file in Build path of the project.

Right click on the project > Build Path > Configure Build Path,
Then select libraries and add the jar to build path.

5. Now run the Java Application, There error would have gone.