Home » Java » How to run runnable jar file with external jar dependencies in windows command prompt?

How to run runnable jar file with external jar dependencies in windows command prompt?

Posted by: admin October 21, 2018 Leave a comment

Questions:

I have a runnable jar which requires 2 external jar files for program execution. I put all jar files in same directory and used below command in windows command prompt.

java -cp \jar1.jar:\jar2.jar -jar MyRunnableJarFile.jar

and I got- Exception in thread “main” java.lang.Error: Unresolved compilation problems:

Answers: