I recently answered this question:
My answer was:
There is an open source utility called "webdrivermanager" to handle WebDriver binaries (chromedriver, operadriver, IEDriverServer) in Java. This library downloads the latest version of the WebDriver binary you need, store it in the Maven local repository (.m2/repository), and export the proper Java system variable (webdriver.chrome.driver, webdriver.opera.driver, webdriver.ie.driver):
https://github.com/bonigarcia/webdrivermanager
Simply adding this dependency to your Maven project:
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>1.0.0</version>
</dependency>
... you can invoke the following methods and webdrivermanager does to the trick for you:
ChromeDriverManager.setup();
InternetExplorerDriverManager.setup();
OperaDriverManager.setup();
Then you can create your WebDriver object (ChromeDriver, OperaDriver, InternetExplorerDriver) to carry out automated web browsing.
My answer was deleted by bluefeet moderator.
Why did you delete my answer?
IMHO my answer is a valuable contribution to the topic. The library I speak there is an open-source library I made myself and I released to the community. Even if the selected answer if other, I think my contribution could help a lot of people.