Hi, What effect will Java RMI have on the following line of code?
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
Its not working for me in an RMI call. I am new to java and RMI so please elaborate your answer in detail.
Edit:
//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;
}
I have pasted the code. Can you please tell how to get the full stack trace?
Here is the batch file that I use to run the my code
% I am in my source code dir
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