Cannot open Selenium Jar file from CMD. Problem Path or ClassPath?

I am trying to run:

java -jar selenium-server-standalone-2.14.0.jar -role hub 

from my command line, but the output was as follows:

 C:\Program Files (x86)>java -jar selenium-server-standalone-2.14.0.jar -role hub Unable to access jarfile selenium-server-standalone-2.14.0.jar 

C: \ Program Files (x86) is the jar file.

I put C: \ Program Files (x86) in my PATH and CLASSPATH and it still won't work.

+7
source share
4 answers

Your file name must be incorrect. Check if you have a file named -selenium-server-standalone-2.14.0.jar. Most likely, you will not be. :)

+7
source

I ran into the same problem. The solution is that there is a naming convention. if you have a selenium server standalone.jar file, you can rename it first to make it simple (abc.jar example).

1) If the jar file on your system encounters a .jar extension, then after renaming, specify the .jar extension (for example, abc.jar)

2) If the jar file on your system does not have the .jar extension, then after renaming, do not provide the .jar extension (for example, abc)

3) Now start the hub: java -jar abc.jar -role hub

Regards, Nikil Canoya

+1
source

Unable to access jarfile file is considered a common error. This error can occur when starting a hub or node. This means that Java cannot find the selenium-server jar file. Either run the command from the directory where the selenium-server-XXXX.jar file is stored, or specify an explicit path to the bank.

Go here for more details here.

+1
source

I had the same issue with ubuntu. Try the following steps.

Change to the directory where the jar file is located.

Then execute the .jar file in the directory using

 java -jar ./selenium-server-standalone-2.14.0.jar 
0
source

All Articles