Unable to launch Chromedriver while running my testng test suite through command prompt
<p><strong>Expected Behaviour:</strong></p>

<p>Chromedriver process should be launched and Chrome browser should be opened , while running my TestNG test suite through command prompt</p>

<p><strong>Actual Behaviour:</strong></p>

<p>The testng.xml is instantiated, but Chromedriver is not instantiated while running through the command prompt
I do not see chrome.exe appear in the task manager when running the test through command prompt and testng The test runs fine while running them through Eclipse IDE with TestNG
Steps to reproduce -</p>

<ol>
<li>Download appropriate prebuilt server as instructed on the webdriver wiki page: <a href="http://code.google.com/p/selenium/wiki/ChromeDriver" rel="nofollow">http://code.google.com/p/selenium/wiki/ChromeDriver</a></li>
<li>specified its location via the <code>webdriver.chrome.driver</code> system property</li>
<li>Instantiate the driver</li>
<li>I have also added the chromedriver exe path and the Chrome browser exe path on my OS <code>PATH</code> Environment variable
this is my "Path"</li>
</ol>

<blockquote>
  <p>PATH=C:\ProgramData\Oracle\Java\javapath;%JAVA_HOME%\bin;C:\Program
  Files\Java\jdk1.8.0_77\bin;C:\Users\mbr9\workspace\FinalAutomation\lib;C:\Program
  Files (x86)\Google\Chrome\Application;C:\Program Files\Microsoft
  MPI\Bin\;c:\PROGRA~1\ds_shell\code\bin\ds_shell;C:\Oracle11gR2_32bCli\client_1\bin;C:\Oracle11gR2_64bCli\client_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program
  Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Progr am
  Files\Microsoft\Web Platform Installer\;C:\Program Files
  (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files
  (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program
  Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files
  (x86)\Lenovo\Access Connections\;C:\Program Files\Lenovo\Fingerprint
  Manager Pro\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common
  Files\Intel\WirelessCommon\;c:\Program Files\ThinkPad\Bluetooth
  Software\;c:\Program Files\ThinkPad\Bluetooth Sof tware\syswow64;
  testngchromedrivecommandprompt</p>
</blockquote>

<p>able to run C:\Program Files (x86)\Google\Chrome\Application\chrome.exe manually</p>

<p>My testng tests run well with Eclipse IDE using Chromedrive, issue is when running them though commandprompt. these testng test run great on Firefox while running through command prompt 6.Chromedriver process is opened by typing "chromedriver" through the command prompt , i.e. I get this message:</p>

<blockquote>
  <p>Starting ChromeDriver 2.21.371459
  (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4) on port 9515 Only local
  connections are allowed.</p>
</blockquote>

<p>Here is my code:</p>

<pre><code>public class TestNGMyClass {

    public static WebDriver driver1;

    @BeforeMethod // @BeforeTest
    public void setup() {
        System.setProperty("webdriver.chrome.driver", "C:\Users\mbr9\workspace\FinalAutomation\lib\chromedriver.exe");
        driver1 = new ChromeDriver();
        driver1.manage().window().maximize();
        driver1.navigate().refresh();
        driver1.manage().deleteAllCookies();
        driver1.navigate().to("https://www.google.com");
    }
}
</code></pre>