Connecting to the Java "derby" Netbeans database without Netbeans.
Joined: Apr 17, 2007
My situation: - Created an application with Netbeans that uses the Java "Derby" database on my local machine. - I can connect to the database fine on my machine by using the connect options in Netbeans. - I don't want to use Netbeans to execute this program. - I have the JAR file available. When I try executing the JAR file, it will fail because I'm not connected to the database.
My Questions: How do I execute my program and connect to the database without using Netbeans? Should I be using a script to connect to the database and then executing the JAR file? Is there a better way?
Joined: Mar 22, 2005
Derby has nothing to do with NetBeans; it's a database that's bundled with the JDK. If you have problems using it outside of NetBeans, then it may be a classpath issue (meaning the Derby jar files are not available when the program is run). What command are you using to run your program?