Closed jfbarthe-sls closed 7 years ago
The java classpath using command line argument "cp" or "classpath" needs to point to the java jar file.
java -cp "/path/to/file.jar" gov.uspto.bulkdata.cli.ExtractPatent
My bad, with your example java -cp BulkDownloader/target/:BulkDownloader/target/dependency-jars/ gov.uspto.bulkdata.cli2.BulkData --type application --years="2016" --limit=1 --outdir="download"
I still get the Error: Could not find or load main class gov.uspto.bulkdata.cli2.BulkData
.
Question: for "/path/to/file.jar", where can I find the jar file? BulkDownloader/target/ shows no jars.
Hi Brian,
Quick update:
1) I had no jars because my Maven build was failing. Changing the plugin in the pom.xml from maven-assembly-plugin to maven-shade-plugin help me with the dependencies.
2) You're right, the -cp needed to point to the jar file (without a space) and changing the --years=2016
to --date=20160101-20161231
.
Successful command was:
java -cp BulkDownloader/target/*:BulkDownloader/target/dependency-jars/*:BulkDownloader/target/BulkDownloader-0.0.1-SNAPSHOT.jar gov.uspto.bulkdata.cli2.BulkData --type=grant --date=20160101-20161231 --limit=0 --outdir="download"
Hi, Java-challenged here... So I was able to build the project fine under Linux with IntelliJ, bar some warnings. Yet, when I try your examples in #4 like:
java gov.uspto.bulkdata.cli.ExtractPatent --source="download/ipa150101.zip" --skip 0 --limit 5 --outdir="download" --aps=false
I get thisError: Could not find or load main class gov.uspto.bulkdata.cli.ExtractPatent
.I suspect an obvious issue with how to set my Classpaths. In my system, I have:
Thank you for bearing with me. JF