0
votes

I cant execute java jar file from cmd windows 10. I have generated a jar file using Intellji.

when I run the command Java -jar I got this error

Error: Unable to access jarfile

I tried running the cmd with administration right but same error. the class path is set correctly. the jar file is located in the right directory .

What could be causing the problem? Thank you

1
what is the name of your jar file?Scary Wombat

1 Answers

0
votes

make sure you use

java -jar TestJar.jar

instead of

java -jar TestJar

If this is not your error, the file might not exist or you don´t have permission to open it.