This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages 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());}
}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic