pgsql-jdbc and Java

Поиск
Список
Период
Сортировка
От abdelkader belkadi
Тема pgsql-jdbc and Java
Дата
Msg-id 20050803153923.33521.qmail@web25705.mail.ukl.yahoo.com
обсуждение исходный текст
Ответы Re: pgsql-jdbc and Java  ("Xavier Poinsard" <xpoinsard@free.fr>)
Re: pgsql-jdbc and Java  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Hello,
I developped my java project with Java NetBeans IDE,
the code connects to a postgreSQL database using the postgresql-8.1dev-400.jdbc3.jar driver, the project builds and executes correctly when using the IDE, however when trying to use the DOS command line as follow:
D:\java -jar projectpath/projectname.jar
the following error is generated:
Class not found !
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 logfilerewriter.Main.connectDb(Main.java:235)
        at logfilerewriter.Main.main(Main.java:45)
I checked the class path, it is correctly set.
The error disapears if I don't call the method that connects to the database, which means that their is no CLASSPATH problem.
 
does somebody has the solution, or met this problem before...?
 
thank you in advance
 
 


Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez le ici !

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Minal
Дата:
Сообщение: Re: postgresql.stat.result
Следующее
От: "Xavier Poinsard"
Дата:
Сообщение: Re: pgsql-jdbc and Java