如何仅使用命令行运行 maven 创建的 jar 文件
我需要一些帮助来尝试使用命令行运行以下maven项目:https://github.com/sarxos/webcam-capture,网络摄像头捕获qrcode示例是我尝试运行的那个。我使用Eciplse IDE运行它,但需要将其移动到仅使用命令行。我有由maven创建的罐子。
我在努力
java -classpath ./webcam-capture/target/webcam-capture-0.3.10-SNAPSHOT.jar com.github.sarxos.webcam.WebcamQRCodeExample
但我不断得到
Exception in thread "main" java.lang.NoClassDefFoundError: com/github/sarxos/webcam/WebcamQRCodeExample
Caused by: java.lang.ClassNotFoundException: com.github.sarxos.webcam.WebcamQRCodeExample