I am running Eclipse on Windows.
Following this tutorial I downloaded JDBC4, added it to my build path using Project>Properties>add External JAR, browsed for the fil
It's a CLASSPATH issue; the PostgreSQL JDBC driver isn't available when the class loader tries to load it. You need to add it to your CLASSPATH correctly.
If it works in Eclipse, it's because adding a JAR to the build path is adding it to the CLASSPATH. You have to understand how CLASSPATH works without the Eclipse training wheels to help you.