0

I want to run my executable jar file into another person machine as i need to share this jar file as tool to the team. I have installed jdk in that machine. still am not able to run that jar by double click . As this jar file has the selenium code , while run it through cmd prompt it saying below error. DO i need to place my IEDriverserver.exe into that machine as well.

What are the steps to run my executable jar file into another machine? Please help me.

Exception in thread "main" java.lang.IllegalStateException: The driver executabl
e does not exist: C:\Automation\IEDriverServer.exe
        at com.google.common.base.Preconditions.checkState(Preconditions.java:51
8)
        at org.openqa.selenium.remote.service.DriverService.checkExecutable(Driv
erService.java:136)
        at org.openqa.selenium.remote.service.DriverService.findExecutable(Drive
rService.java:131)
        at org.openqa.selenium.ie.InternetExplorerDriverService.access$000(Inter
netExplorerDriverService.java:32)
        at org.openqa.selenium.ie.InternetExplorerDriverService$Builder.findDefa
ultExecutable(InternetExplorerDriverService.java:167)
        at org.openqa.selenium.remote.service.DriverService$Builder.build(Driver
Service.java:330)
        at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetEx
plorerDriver.java:288)
        at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorer
Driver.java:210)
        at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorer
Driver.java:154)
Loga
  • 19
  • 1
  • 4
  • 11

1 Answers1

0

Yes you will have to put the driver files on all those system on which you want to run your application, you could do this manually or you could automate this task using you jar itself,

Step 1 : You can add resources to your jar then,

Step 2 : You can copy that resource to the system from the JAR

The copying should be a one time process, you can handle this by creating some static information on the machine whenever you application is run first time.

you could use the following link:

How to copy file inside jar to outside the jar?

Community
  • 1
  • 1