Subject Re: Develop Java Application with Embedded Server
Author serge.fonville
--- In, Roman Rokytskyy
<rrokytskyy@...> wrote:
> > I read somewhere (IIRC) that it should be somehow possible to
have a
> > jdbc driver that doesn't need dll's or anything and would make it
> > possible to do all connecting to the database from pure java
> > (somthing with JDBC 4).
> You have confused something. Jaybird implements the wire protocol
to the
> server in Java, but it can't access the database file from Java. In
> other words, when you have running Firebird server (a standalone
> that listens to the network socket), you can use pure Java driver
> you don't need DLLs.
> But this won't replace you the Firebird Embedded if you want to
> the database file from Java - Jaybird driver has no idea what is
> in the file, no idea how to execute SQL, it just translates the
> into native Firebird API.
> > What is the current status,
> Production ready - it have been used since 2002 or so :)
> > since this would
> > make it very feasible to make a portable application. Say I
> > exe files for windows and sh script for *nix and I just dump
> > everything in one directory and the application 'just works'
> Well... nothing speaks against having such solution with Firebird
> Embedded - only don't forget to include the required DLLs :)
> Roman
The last thing I have discoverd (not really specific to Jaybird):
When using System.load(AbsolutePathToLibrary) it is no longer needed
to specufy the directory where jaybird21.dll is located.

The appliciable code:
File library = new File("jaybird21.dll");
String libraryPath = library.getAbsolutePath();

Altough this makes the application no longer platform independant, a
work around should be possible (e.g System.getProperty(""))