0

this is my project structure:

enter image description here

I added the generated jar and the picoCli jar in an external folder in the path:

/Users/myUserName/Documents/picocli/

And I'm trying to execute my program with the command:

java -cp "/Users/{myUserName}/Documents/picocli/picocli-4.6.3.jar:/Users/{myUserName}/Documents/picocli/bashTool-1.0-SNAPSHOT" CheckSum --algorithm SHA-1 hello.txt

But I'm getting the next error message:

Error: Could not find or load main class CheckSum
Caused by: java.lang.ClassNotFoundException: CheckSum

I'm executing this command in the target/classes folder, if I execute just the java CheckSum the class is executed but with some error for dependencies. I'm not sure what I'm missing, but so far I'm not able to run this program. Trying to execute a basic example of the the https://picocli.info/#_packaging_your_application library.

Any ideas?

rasilvap
  • 1,255
  • 1
  • 23
  • 46
  • Why did you create a new question instead of editing [the one from yesterday](https://stackoverflow.com/questions/72309891/java-cp-error-could-not-find-or-load-main-class-java-lang-classnotfoundexcept)? – Federico klez Culloca May 20 '22 at 16:00

0 Answers0