attach derby database into jar file

巧了我就是萌 提交于 2019-12-24 07:10:03

问题


I am midway through a database application(SWING). I am using Java DB and NetBeans 7.1.2. Within the IDE, the app runs good, provided I initially connect the database manually in the 'services' window. Also, I have added the derby.jar and derbyclient.jar files to the libraries. But when running the app from the "dist" folder, it fails to connect to the database. I want to know whether i can attach the db within the jar file so that i can run the app from outside the IDE. Thank you.


回答1:


You can do the following

  • Start java DB outside the netbeans or
  • If you use Derby, go with Embedded mode. Such a way you can run your application without separate db server.


来源:https://stackoverflow.com/questions/12330496/attach-derby-database-into-jar-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!