java.lang.ClassNotFoundException: org.postgresql.Driver

前端 未结 2 1751
孤街浪徒
孤街浪徒 2020-12-07 06:17

Whenever I build my project as jar(via NetBeans) it seems that it does not include the postgresql driver library. I remember doing it before without any problems on previous

2条回答
  •  一生所求
    2020-12-07 06:33

    You would have to add the postgre jar to your classpath:

    C:\Users\Username>java -classpath "location of postgresql-9.0-801.jdbc4.jar" -jar "C:\Users\Username\Documents\NetBeansProjects\OrdersImpo rt\dist\OrdersImport.jar" C:\orders\sometextfile.txt
    

提交回复
热议问题