Executable jar file can't connect to remote Database.
Hello,
I'm working on a project and for this i need to communicate between a Swing App and a postgressql database.
When I execute the app within Eclipse there is no problem but when I export it to a Executable jar file i get an error:
JDBC Error:
java.lang.ClassNotFoundException: org.postgresql.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at database.DatabaseConnection.openConnection(DatabaseConnection.java:30)
at database.DatabaseLists.getPassword(DatabaseLists.java:242)
at gui.LoginFrame.actionPerformed(LoginFrame.java:146)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
etc. etc. etc.
heres the .classpath from the file:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre1.5.0_11"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/PostgreSQL"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/Tini"/>
<classpathentry kind="output" path=""/>
</classpath>
what am i doing wrong?
Best regards,
Guus

