• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC and Cloudscape

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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());}
}
}
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic