javajarexecutable-jar

What causes "Unable to access jarfile" error?


I want to execute my program without using an IDE. I've created a jar file and an exectuable jar file. When I double click the exe jar file, nothing happens, and when I try to use the command in cmd it gives me this:

Error: Unable to access jarfile <path>

I use the command: java -jar Calculator.jar

How I created the jar:

  1. Right click on project folder (Calculator)
  2. Select
  3. Click on Java Folder and select "Exectuable Jar File", then select next
  4. Launch Configuration: Main - Calculator
  5. Create Export Destination
  6. Hit "Finish" and profit! Well, not really.

Solution

  • Fixed

    I just placed it in a different folder and it worked.