Problem running .jar in terminal

2

I'm doing a project in eclipse. At the moment of exporting the program by means of the option RunnableJarfile , it makes all the export, I keep it in my desk and at the moment of wanting to test it in my computer by means of the terminal through the following instruction:

java -jar Cloud.jar "192.168.0.0/24" "193.168.0.0/32"

in the terminal I get this error: Unable to accces jarfile Cloud.Jar , which is included in parentheses does not matter, that only takes to fill some data, I tried to perform the same procedure on another computer and send me the same error.

    
asked by Arturo Vera 17.02.2017 в 16:53
source

1 answer

4

The problem occurs when you send the call to .jar you are not positioned on the folder where the file is contained. The error is solved by directing where your file is located in the following way:

cd C:\Users\myUser\Desktop

Where myUser is the user of the PC.

After that, execute .jar in the following way:

java -jar Cloud.jar

    
answered by 17.02.2017 / 18:14
source