Skip to main content

Developing Swing Application tool with MS Access DB

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
JayaramN
Offline
Joined: 2013-02-15

I am planning to develop a swing application tool ie. Expense calculator or software for personal use.
Is it possible to create such application so that It will talk with MS Access database to store data and once it is developed and i will be bundling it into jar or exe file.
So when copying the jar or exe file to some other laptop or system I dont want to configure the DSN name or connection setting to MS Access in each system where i am going to put the file.
instead on click of the exe or jar file the connection will be set automatically I mean the exe or jar should work independently on each system where i am going to run it
Is it feasible in Java ?

Thanks & Regards
JayaramN

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
phil1234
Offline
Joined: 2011-07-15

First of all, would you only want to use MS Access? There is a very easy way in Java to connect to databases using JDBC drivers. However, there is no official JDBC driver for MS Access and the JDBC-ODBC driver doesn't seem to work on Windows 64-Bit, so you would have to use a library like Jackcess. But I don't know to what extend this is relevant to you as I don't know in what environment your software will be running.
Most other databases like MySQL or HSQLDB work fine though.

I'm not sure how to connect to a remote database exactly, but I guess if you don't want to use a DNS name for the host computer, you would have to enter its IP-address everytime you want to connect to it.