Question

I'm trying to create a Java application using Firebird embedded server.

The issue is: I want the application to run with both Java 32bit and Java 64bit (without any modification by client).

To run Firebird I have to add jaybird22.dll and jaybird22_x64.dll to app main directory - so far ok, but in this directory should be also: ib_util.dll icudt30.dll etc. which are different for different versions of JVM.

Is there any solution to this problem?

Was it helpful?

Solution

The short answer is: no you can't.

You need to include the right bitness files for Firebird embedded in the root of your application, and as the libraries of the 32 bit and 64 bit versions of Firebird embedded have identical names, it is not possible to include them both.

UPDATE To my shame (as a developer of Jaybird ;), I just found out it is actually possible to work with both 32 bit and 64 bit versions of embedded in one folder structure, but this requires that you are able to set the PATH environment variable before running your Java application (eg through a .bat, .cmd or a launcher).

If you put the files in two folders, eg 64bit and 32bit, you should be able to use a batch file in the root of your application (I am assuming here that jaybird22.dll and jaybird22_x64.dll are also in these folders):

@echo off
set PATH=%PATH%;%CD%\64bit;%CD%\32bit
java -cp .;jaybird-full-2.2.3.jar your.package.MainClass

FYI %CD% means Current Directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top