How to use Firebird embedded with Java (via JDBC)?


These instructions are based on Release Notes for Jaybird JDBC driver. Please refer to the Release Notes in your installation for the most up-to-date information.

Embedded Server requires that you use a special connection path string. It is similar to using the regular Firebird client library, however fbembed.dll on Windows and libfbembed.so on Linux are used.

Here are the steps to make it work:

1. Unpack Firebird embedded .zip package in some directory. You need all the files, not just FBEMBED.DLL.
2. Set FIREBIRD environment variable to point to that directory.
3. Place the JAYBIRD.DLL in the PATH (by PATH, we mean the value of environment variable PATH)
4. Change the JDBC URL in your application, to something like this:

jdbc:firebirdsql:embedded:/path/to/your/database.fdb

5. Start your Java application

If this does not work, try specifying the following parameter to JVM:

-Djava.library.path=<path_to_jaybird_dll>


Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page.



All contents are copyright © 2007-2024 FirebirdFAQ.org unless otherwise stated in the text.


Links   Firebird   News   FlameRobin   Powered by FB: Home Inventory   Euchre  
Add content   About  

Categories
 Newbies
 SQL
 Installation and setup
 Backup and restore
 Performance
 Security
 Connectivity and API
 HOWTOs
 Errors and error codes
 Miscellaneous