aspose file tools*
The moose likes JDBC and the fly likes Connecting to the Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Connecting to the Java "derby" Netbeans database without Netbeans." Watch "Connecting to the Java "derby" Netbeans database without Netbeans." New topic
Author

Connecting to the Java "derby" Netbeans database without Netbeans.

Jeff Schuler
Greenhorn

Joined: Apr 17, 2007
Posts: 23
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?

Thanks,
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
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?


Ping & DNS - my free Android networking tools app
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Connecting to the Java "derby" Netbeans database without Netbeans.