Java examples for java.sql:Derby
connect To derby DataBase
//package com.java2s; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class Main { public static void main(String[] argv) throws Exception { connectToDataBase();//from w w w. ja va 2 s . c o m } private static Connection veza; public static void connectToDataBase() { try { veza = DriverManager.getConnection("jdbc:derby:baza/MyDB", "test", "test"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }