title: Selenium webdriver Unsupported major.minor version 51.0 - Java version issue
body: <p>I am setting selenium web driver. I set it up as Maven project. </p>
  
  <p>My basic "Hello world" equivalent tests that are not using webdriver is class is working fine. How ever when I tried using the code breaks and I get the following error.</p>
  
  <pre><code>WebDriver driver = new FirefoxDriver();
  </code></pre>
  
  <blockquote>
    <p>java.lang.UnsupportedClassVersionError:
    org/openqa/selenium/firefox/FirefoxDriver : Unsupported major.minor
    version 51.0</p>
  </blockquote>
  
  <p>From what I understand it is a java version issue. So, I went ahead and installed Java 1.8.</p>
  
  <p>When I run <code>java -version</code> I get this:</p>
  
  <blockquote>
    <p>java version "1.8.0_77" Java(TM) SE Runtime Environment (build
    1.8.0_77-b03) Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)</p>
  </blockquote>
  
  <p>But still my code breaks. </p>
  
  <ol>
  <li><p>My bash profile still reads java 1.6 export <code>PATH="/Users/pathToPerForce/p4/JavaLib/main/build/apache-ant-1.6.3/bin:/Applications/p4:${PATH}</code></p></li>
  <li><p>When I set up this as Maven project I could right click on project and "build as" maven build. Now that is failing too.</p></li>
  </ol>
  
  <p>I am fairly new to java and selenium and not able to comprehend this is good depth. Any help in fixing this is much appreciated.</p>