I believe there is a syntax mistake in the following while specifying the path for the jar file creation, there should be no hyphen before the drive path, just simple space.
I have tried on the command prompt on windows 10. Maybe I am wrong please confirm, I just learning, so I may be wrong.
This is chapter 1.
Creating a JAR File
jar -cvf myNewFile.jar .
jar --create --verbose --file myNewFile.jar .
Alternatively, you can specify a directory instead of using the current
jar -cvf myNewFile.jar -C dir . <<--- the extra hyphen throws error. ": no such file or directory"
jar -cvf myNewFile.jar C dir <<-- removed hypen, creates jar successfully.