mardi 3 novembre 2020

How to find missing class in complex Java application when running java command in DOS

I have a complex Java app using 5 or 6 Maven artifacts, plus my own code. I have downloaded their jar files and am referencing them explicitly in the -classpath parameter of a java command.

The main line specified in the java command does exist, and I can run it under Eclipse.

However, when I try to run the java command, I get the message Error: Could not find or load main class. I understand that this is probably due to a class that it can't find somewhere in the application.

My question is simply whether there is a way to zero in on the class or classes that are missing or misspelled! I tried -verbose, but this doesn't show any of my code... I did prefix my -classpath with the .; so it should at least have been able to see my code!

Thanks.

Aucun commentaire:

Enregistrer un commentaire