Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC and Cloudscape

 
Jodie Anderson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I installed J2EE, JDK1.3, set the path for J2EE_PATH to point to the j2ee bin directory, and JAVA_HOME to point to the directory where JDK1.3.1 is installed.
When I run the following basic program, I get the output of "null".
Being new to both technologies, I am unsure why.
Any ideas would be great!
import java.sql.*;
public class Exercise2_1 {
static String driver = "COM.cloudscape.core.JDBCDriver";
static String url = "jdbc:cloudscape:SimpleDB;create=true";
public static void main(String[] args) {
try{
Class.forName(driver).newInstance();
System.out.println("Loaded driver");
Connection conn=DriverManager.getConnection(url);
System.out.println("Connected to database");
conn.close();
System.out.println("Closed connection");
}
catch(Throwable e)
{System.err.println(e.getMessage());}
}
}
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic