Subject | Re: [Firebird-Java] JayBird and FireBird locations |
---|---|
Author | Roman Rokytskyy |
Post date | 2009-09-28T19:40:50Z |
Hi,
Firebird Embedded Server, so the general rules of Firebird Embedded
Server apply (see %FIREBIRD_EMBEDDED%\doc\README_embedded.txt, Ch.3):
------------------------------------------------------------------
3. USAGE
Just copy fbembed.dll, icudt30.dll, icuin30.dll and
icuuc30.dll into the directory with your application.
Then rename fbembed.dll to either fbclient.dll or
gds32.dll depending on your database connectivity software.
Then start your application and it will use the embedded
server as a client library and will be able to access
local datasases. You should also copy firebird.msg and
firebird.conf (if necessary) to the same directory.
If external libraries are required for your application,
then you should have them separately. Most probably, it
will be INTL support (fbintl.dll and fbintl.conf) or UDF
libraries. To be able to use them, you should place them
into the directory tree which emulates the Firebird server
one, i.e. has subdirectories like /intl or /udf:
c:\my_app\app.exe
c:\my_app\gds32.dll
c:\my_app\ib_util.dll
c:\my_app\icudt30.dll
c:\my_app\icuin30.dll
c:\my_app\icuuc30.dll
c:\my_app\firebird.conf
c:\my_app\firebird.msg
c:\my_app\intl\fbintl.dll
c:\my_app\intl\fbintl.conf
c:\my_app\udf\fbudf.dll
If you want to place the Firebird files (excluding the
renamed fbembed.dll) in another directory, you need to
modify your firebird.conf and set RootDirectory to the
Firebird directory tree. Example:
c:\my_app\app.exe
c:\my_app\gds32.dll
c:\my_app\ib_util.dll
c:\my_app\icudt30.dll
c:\my_app\icuin30.dll
c:\my_app\icuuc30.dll
c:\my_app\firebird.conf
d:\fb\firebird.msg
d:\fb\intl\fbintl.dll
c:\fb\intl\fbintl.conf
d:\fb\udf\fbudf.dll
firebird.conf:
RootDirectory = d:\fb
--------------------------------------------------------
What I am surprised of, is that it picks the icu*.dll files from the
working dir, not from the path. I suspect that this is the only problem
in such setup.
Roman
> I confirmed that copying fbembed.dll, icudt30.dll, icuin30.dll andOne of the issues is that Java environment cannot impose the rules to
> icuuc30.dll to the working/startup directory fixed the problem and allowed
> me to connect to Firebird via JayBird.
>
> I appreciate this solution, but ideally I would like to keep all Firebird
> libraries on one place in order to simplify the upgrade. I was hoping that
> just setting the RootDirectory in firebird.conf, putting RootDirectory path
> on java.library.path and adding firebird.conf to Java classpath would do the
> trick. Is there a reason why this is not working this way?
Firebird Embedded Server, so the general rules of Firebird Embedded
Server apply (see %FIREBIRD_EMBEDDED%\doc\README_embedded.txt, Ch.3):
------------------------------------------------------------------
3. USAGE
Just copy fbembed.dll, icudt30.dll, icuin30.dll and
icuuc30.dll into the directory with your application.
Then rename fbembed.dll to either fbclient.dll or
gds32.dll depending on your database connectivity software.
Then start your application and it will use the embedded
server as a client library and will be able to access
local datasases. You should also copy firebird.msg and
firebird.conf (if necessary) to the same directory.
If external libraries are required for your application,
then you should have them separately. Most probably, it
will be INTL support (fbintl.dll and fbintl.conf) or UDF
libraries. To be able to use them, you should place them
into the directory tree which emulates the Firebird server
one, i.e. has subdirectories like /intl or /udf:
c:\my_app\app.exe
c:\my_app\gds32.dll
c:\my_app\ib_util.dll
c:\my_app\icudt30.dll
c:\my_app\icuin30.dll
c:\my_app\icuuc30.dll
c:\my_app\firebird.conf
c:\my_app\firebird.msg
c:\my_app\intl\fbintl.dll
c:\my_app\intl\fbintl.conf
c:\my_app\udf\fbudf.dll
If you want to place the Firebird files (excluding the
renamed fbembed.dll) in another directory, you need to
modify your firebird.conf and set RootDirectory to the
Firebird directory tree. Example:
c:\my_app\app.exe
c:\my_app\gds32.dll
c:\my_app\ib_util.dll
c:\my_app\icudt30.dll
c:\my_app\icuin30.dll
c:\my_app\icuuc30.dll
c:\my_app\firebird.conf
d:\fb\firebird.msg
d:\fb\intl\fbintl.dll
c:\fb\intl\fbintl.conf
d:\fb\udf\fbudf.dll
firebird.conf:
RootDirectory = d:\fb
--------------------------------------------------------
What I am surprised of, is that it picks the icu*.dll files from the
working dir, not from the path. I suspect that this is the only problem
in such setup.
Roman