Results 1 to 5 of 5
- 12-22-2011, 05:13 PM #1
Member
- Join Date
- Nov 2011
- Posts
- 49
- Rep Power
- 0
Basic Database (Derby) Distribution Question
I'm working on my java by creating a fictitious company and acting like the programmer for the company. My hr department wants a program to enter employee information and by able to save it to a database. This is the first part of the request. So far I have created a database and gui to interact with the database. Here is what I have when someone clicks on the distributable jar file.

I don't know how to get the database into the distribution file. Is it possible to do this? Would I have to create the database on the company network? In either case, I'm not sure how to access the database from the distributable application.
As an aside, I can access the database with the application while in netbeans ide. Also, if anyone knows how to change the label of the application from "Database Application Example" that would be great. I've ran through the source code and can't find where to change this.
Thanks in advance for any help.
- 12-22-2011, 05:30 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: Basic Database (Derby) Distribution Question
Derby/JavaDB can work with databases stored in .jar files but those database are read-only for obvious reasons; better change your application so that it creates the database when it runs for the first time. Given your comment on the frame title I don't think you wrote this code yourself so adjusting the application might be a big task for you ...
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 12-22-2011, 06:31 PM #3
Member
- Join Date
- Nov 2011
- Posts
- 49
- Rep Power
- 0
Re: Basic Database (Derby) Distribution Question
Indeed Jos, I used the design editor in netbeans 7 to create a desktop application that tied into a database that I built ahead of time. Any suggestions on where to research further. I've already looked at the netbeans tutorials and have found how to make the database and how to make the gui to interact with the database, however, I can't find tutorials on how to create a gui + database+ distributable file to make my hr request work.
- 12-22-2011, 07:15 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
Re: Basic Database (Derby) Distribution Question
For the title part: read the API documentation for the JFrame class; that class has a method that can set the title of your frame; somewhere in your (generated) code that method should be called. If you generate your database if it doesn't exist you don't have to ship it with your application; just the derby.jar should be shipped with your application.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 12-23-2011, 09:47 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Similar Threads
-
Database connection with derby on server
By idbirohit in forum New To JavaReplies: 0Last Post: 09-23-2011, 10:18 AM -
Derby database problem
By rjain in forum New To JavaReplies: 1Last Post: 09-22-2011, 12:36 PM -
Basic Database Question
By nephos in forum New To JavaReplies: 7Last Post: 04-24-2011, 12:08 AM -
Deploy derby database
By Muaz.Sh in forum NetBeansReplies: 11Last Post: 03-17-2011, 06:02 PM -
Using Derby Database in Netbeans
By DavidG24 in forum New To JavaReplies: 1Last Post: 09-14-2009, 01:29 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks