Reputation: 576
I have created one new table in Postgres db & I am trying to auto generate the jooq classes using the below command:
java -classpath jooq-3.9.5.jar:jooq-codegen-3.9.5.jar:jooq-meta-3.9.5.jar:postgresql-42.2.2.jar:.org.jooq.util.GenerationTool library.xml
But I am getting error as :
Error: Could not find or load main class library.xml
I have placed the library.xml file in resources folder. I am newbie to jooq, spring boot. Please help how shall I auto generate jooq classes.
Upvotes: 1
Views: 296
Reputation: 116091
You are missing a space in your command between the end of the classpath and the start of the name of the main class that you want to run. As a result, java
is trying to execute a main class called library.xml
rather than org.jooq.util.GenerationTool
. Try the following command instead:
java -classpath jooq-3.9.5.jar:jooq-codegen-3.9.5.jar:jooq-meta-3.9.5.jar:postgresql-42.2.2.jar:. org.jooq.util.GenerationTool library.xml
Note the space before org.jooq.util.GenerationTool
.
Upvotes: 1