Sample of Embedded Database in a Swing Application

Sometimes its handy to have a database embedded within an application. It means that your users don't need to install any database software themselves. Saves a lot of hassle all round.

Sometime ago my colleague Ashwin Rao put together these instructions, which extend the NetBeans Platform CRUD Tutorial such that an embedded database is used rather than an external one.

There've been some questions around that scenario recently, so I uploaded the sources of the embedded database scenario here:

Use the above, i.e., use Subversion with the above link to check out a growing set of NetBeans API samples. One of them is this one:

Once you've opened the above in the IDE, you should see this structure, i.e., notice the Derby database CustDB below, in the Files window:

When you run the app, you should see this, i.e., data from an embedded database displayed in a NetBeans Platform application:

I.e., a very simple, yet functioning, sample of an embedded database within a Swing application.


Neat project, is all of this necessary to embed a DB into the IDE?

Posted by slbmeh on January 24, 2012 at 09:19 AM PST #

No, not into the IDE. Into an application created on top of the NetBeans Platform.

Posted by Geertjan on January 24, 2012 at 10:58 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« March 2015