title: Class.forName not working in Java RMI call
body: <p>What effect will Java RMI have on the following line of code? </p>
  
  <p><strong>Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");</strong></p>
  
  <p>Its not working for me in an RMI call. I am new to java and RMI so please elaborate your answer in detail.</p>
  
  <p>Edit:</p>
  
  <pre><code>//String connect to SQL server
  String url = "jdbc:sqlserver://" + strServerIPAddress + ":1433" + ";DatabaseName=" + strDatabaseName;
  
  try {
  
      Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
  
  } 
  catch (java.lang.ClassNotFoundException e) 
  
  { 
      System.out.println(e.getCause().toString());
      return false;
  }
  </code></pre>
  
  <p>I have pasted the code. Can you please tell how to get the full stack trace?</p>
  
  <p>Here is the batch file that I use to run the my code</p>
  
  <p>% I am in my source code dir</p>
  
  <pre><code>javac -d classes -cp classes *.java
  rmic -classpath classes -d classes myrmi.DummyImpl myrmi.BookImpl    
  start rmiregistry -J-Dsun.rmi.loader.logLevel=VERBOSE
  
  start java -cp classes -Djava.rmi.server.codebase=file:///C:\NetBeansProjects\MyProject\src\myrmi\classes\ -Djava.security.policy=java.policy 
  
  myrmi.Server SEB 
  start java -cp classes -Dsun.rmi.loader.logLevel=VERBOSE  -Djava.security.policy=java.policy myrmi.Client 
  </code></pre>