PostgreSQL - Installing JDBC driver

前端 未结 4 1432
误落风尘
误落风尘 2021-01-02 06:19

I\'m having a hard time working out how I should be installing the JDBC driver for PostgreSQL on my debian 6.0 server. I have moved the driver .jar into the following direct

4条回答
  •  抹茶落季
    2021-01-02 06:30

    In your IDE (Idea, Eclipse, etc) you need to add that path as a library.

    Alternatively, you can compile and execute from the command-line, if you define a CLASSPATH variable which includes that.

    export CLASSPATH=/usr/local/pgsql/share/java/postgresql.jar
    javac -classpath $CLASSPATH MyDBApp.java
    java -cp $CLASSPATH MyDBApp
    

提交回复
热议问题