Error unable to access jarfile C:\Jar That’s because of the space you have in the path name. On Windows, use quotes: java -jar "C:\Jar Folder\P2.jar"