Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jeff Schuler
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic