title: com/microsoft/sqlserver/jdbc/SQLServerDriver has been compiled by a more recent version of the Java Runtime
body: <p>I has db in MS SQL Server 2005</p>
  
  <p>I has java project write on <strong>java 8</strong>. My project is on <strong>Windows 7 Professional's machine (64 bit)</strong>.</p>
  
  <p>I use this jar: <code>sqljdbc4.jar</code> to connect to <strong>MS SQL Server 2005</strong>.</p>
  
  <p>But when I start my app I get error:</p>
  
  <pre><code> [java] log4j: setFile ended
   [java] log4j: Appender [File] to be rolled at midnight.
   [java] log4j: Adding appender named [File] to category [root].
   [java] [25.05.2019 15:11:44.979] com.myproject.common.LNFSetter.setLNF(LNFSetter.java:60) TRACE:
   [java]     lookAndFeelName=Windows
   [java]     lookAndFeelClassName=com.sun.java.swing.plaf.windows.WindowsLookAndFeel
   [java] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
   [java]     at java.lang.ClassLoader.defineClass1(Native Method)
   [java]     at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
   [java]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   [java]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
   [java]     at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
   [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
   [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
   [java]     at java.security.AccessController.doPrivileged(Native Method)
   [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
   [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
   [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
   [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
   [java]     at java.lang.Class.forName0(Native Method)
   [java]     at java.lang.Class.forName(Class.java:264)
   [java]     at com.myproject.db.DBManagerContext.initConnection(DBManagerContext.java:69)
   [java]     at com.myproject.db.DBManagerContext.initialize(DBManagerContext.java:94)
   [java]     at com.myproject.db.DBManagerContext.&lt;init&gt;(DBManagerContext.java:102)
   [java]     at com.myproject.db.DBManagerContext.getInstance(DBManagerContext.java:115)
   [java]     at com.myproject.common.SystemOptions.getDBManagerContext(SystemOptions.java:382)
   [java]     at com.myproject.m2document.M2DocumentManager.initialize(M2DocumentManager.java:42)
   [java]     at com.myproject.m2document.M2DocumentManager.&lt;init&gt;(M2DocumentManager.java:60)
   [java]     at com.myproject.m2document.M2DocumentManager.getInstance(M2DocumentManager.java:35)
   [java]     at com.myproject.views.ca.scroller.AccountsScroller.init(AccountsScroller.java:182)
   [java]     at com.myproject.views.ca.scroller.AccountsScroller.&lt;init&gt;(AccountsScroller.java:160)
   [java]     at com.myproject.views.ca.MainScreenView.&lt;init&gt;(MainScreenView.java:103)
   [java]     at com.myproject.Main.&lt;init&gt;(Main.java:42)
   [java]     at com.myproject.Main.main(Main.java:54)
  </code></pre>
  
  <p>Here my app's snippet:</p>
  
  <pre><code>import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.util.HashMap;
  import java.util.List;
  import java.util.Map;
  import java.util.Vector;
      private void initConnection(String suffixURL) throws ClassNotFoundException, SQLException {
              String driverName = UserOptions.getOptionsDBDriverName();
              Class.forName(driverName); // ERROR IN THIS LINE
              String url = null;
              String databaseType = UserOptions.getOptionsDBURLType();
              String host = UserOptions.getOptionsDBURLHost();
              String port = UserOptions.getOptionsDBURLPort();
              String databaseName = UserOptions.getOptionsDBURLName();
              if (suffixURL == null) {
                  url = UserOptions.getOptionsAdditionalDBURL(databaseType, host, port, databaseName);
              } else {
                  url = suffixURL;
              }
                  String userName = UserOptions.getOptionsDBUserName();
              String password = UserOptions.getOptionsDBPassword();
              connection = DriverManager.getConnection(url, userName, password);
  
          }
  </code></pre>
  
  <p>Error in this line:</p>
  
  <pre><code>Class.forName(driverName); // ERROR IN THIS LINE
  </code></pre>
  
  <p>comment: </p>
  
  <pre><code>driver name=com.microsoft.sqlserver.jdbc.SQLServerDriver
  </code></pre>
  
  <p>P.S. I can't upgrade to <strong>jdk 9</strong>. I can use only <strong>jdk 8</strong></p>