Unzip the downloaded zip file to c:\Java
In the command line, go to the lib folder under extracted derby folder. e.g.
cd C:\Java\db-derby-10.9.1.0-bin\lib
Start the derby server by
java -jar derbynet.jar start
Open another command line window, go to the folder in which you will create the derby database
e.g. cd C:\derbydb
Connect the derby server with the ij derby tool
java -jar C:\Java\db-derby-10.9.1.0-bin\lib\derbyrun.jar ij
CONNECT 'jdbc:derby://localhost:1527/c:\derbydb\mydb;create=true';
create table STUDENT (stuid int, name varchar(10));
insert into STUDENT values (1, 'Wang');
exit;
Test the connection in Squirrel
Note: User Name and Password can be anything but empty.
No comments:
Post a Comment