Re: Ver. 12.1 successfully installed on Win 10 but having trouble with jdbc jar

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: CR20 <mez283em23e2ze2(at)yahoo(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Ver. 12.1 successfully installed on Win 10 but having trouble with jdbc jar
Date: 2020-01-20 09:13:36
Message-ID: 45d8549f99c0bad714a7fa8fbac3a002bcbcdbd0.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sun, 2020-01-19 at 19:24 -0500, CR20 wrote:
> ...which compiled successfully but when I go to run it, with postgresql-42.2.9.jar stored in path C:\PostgreSQL\libs, like as follows:
>
> java -cp C:\PostgreSQL\libs . CreateTable
>
> ...the command line returns:
>
> Error: Could not find or load main class .
>
> Some of this is my limited knowledge of Java.

Indeed. You have to treat the JAR file as if it were a directory,
that is, put the file itself on the class path:

java -cp C:\PostgreSQL\libs\postgresql-42.2.9.jar;. CreateTable

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Joni Ruuskanen 2020-01-20 14:13:43 Restore fails if using multiple threads and database is dumped through pipe
Previous Message Scott Ribe 2020-01-20 05:37:04 Re: pg_upgrade from 9.5.10 to 12 fails with encoding issue