Placing geckodriver in resources and mapping it works on the machine am working on, but not on any other machine. i need it to export it to other machines, so that i am creating a jar which i need to run on any other machine, but when running the jar on other machine is throwing out "The path to the driver executable must be set by the webdriver.gecko.driver system property" error.
public static WebDriver createDriver()
{
WebDriver driver= new FirefoxDriver();
System.setProperty("webdriver.gecko.driver", "./src/main/resources/geckodriver");
driver = new FirefoxDriver(FirefoxDriverProfile());
driver.manage().window().maximize();
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
return driver;
[Please take a look at the image]
https://i.stack.imgur.com/khGBu.png