问题
I've installed derby according to this guide and created database in it's ij console. How can I use this database from eclipse? I've downloaded db-derby-10.10.1.1-bin there isn't any jars there.
回答1:
After the installation of derby . Fire up eclipse. Create a java project. Write down any jdbc example program.
Assuming that you want to run a client - server based connection and you have setup class path correctly if not follow this link. Start the derby network server using the command
java -jar %DERBY_HOME%\lib\derbyrun.jar server start
In the eclipse project file right click on it and go to properties->Java Build Path->Libraries Click on Add External JARs. Now browse to the derby installation directory and lib folder and select the following jar files 1. derby.jar 2. derbyclient.jar 3. derbynet.jar 4. derbytools.jar 5. derbyrun.jar
Thats it now your java program will be able to access the derby database that you create.
For step by set procedure you can refer to this link.
来源:https://stackoverflow.com/questions/21528840/eclipse-and-derby