title: java.lang.ClassNotFoundException exception
body: <p>I am doing SqlServer2008 r2 connectivity with android.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  
      String url="jdbc:sqlserver://localhost;instance=14GRAFICALI\\MSSQLSERVER2008;databaseName=AndroidDB;integrated security=true";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
  
          TextView tvData=(TextView)findViewById(R.id.tvSelectedData);
  
          try {
              Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
              Connection conn =DriverManager.getConnection(url);                   
  
              System.out.println("connected");
              Statement statement=conn.createStatement();
              ResultSet resultSet=statement.executeQuery("select * from AndroidDB");
              while(resultSet.next()){
                  tvData.setText(" Data1 : "+resultSet.getString(1)+"  Data 2 : "+resultSet.getNString(2));
              }
  
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>This code is not working and giving me error on line:</p>
  
  <pre><code>Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
  </code></pre>
  
  <p>But when i checked this path, file was there with above path.</p>
  
  <p>Have a look at it:</p>
  
  <p><img src="https://i.stack.imgur.com/oEC1G.png" alt="enter image description here"></p>
  
  <p>What can be the problem?</p>
  
  <p>Please help me.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Javabuildpath:<img src="https://i.stack.imgur.com/5n3du.png" alt="enter image description here"></p>
  
  <p>Libs:</p>
  
  <p><img src="https://i.stack.imgur.com/L7mFQ.png" alt="enter image description here"></p>