Exception in thread "main" org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException

@Aleksei
Hai ,
I got " Exception in thread “main” org.openqa.selenium.WebDriverException: org.apache.http.conn.HttpHostConnectException" Exception while running the java project

MyCode:
Package Webautomation;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.DesiredCapabilities;

public class Webapplication {
static WebDriver driver;
public static void main(String[] args) {
System.setProperty(“webdriver.gecko.driver”,
“D:/Appium lib/geckodriver-v0.9.0-win64/geckodriver.exe”);
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(“marionette”, true);
WebDriver driver = new FirefoxDriver(capabilities);
driver.get(“http://selenium4testing.com/hms/”);
System.out.println(“url opened”);
My firefox version: 55.3
D:\Appium lib\selenium-server-standalone-3.4.0.jar- jar file…

You need to pass DesiredCapabilities with marionette capability to true into FirefoxDriver as well as below :-

System.setProperty(“webdriver.gecko.driver”, “your/path/geckodriver.exe”);

//Now you can Initialize marionette driver to launch firefox
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(“marionette”, true);
WebDriver driver = new FirefoxDriver(capabilities);

and try to use the latest version of FF and Selenium server