File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39535
    
  27
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 - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connecting to the Java "derby" Netbeans database without Netbeans.
 
Similar Threads
Netbeans can't connect to database server
apache derby on os x
context file
Best way to transfer and connect to a database
Im a bit confused