Subject | Re: Develop Java Application with Embedded Server |
---|---|
Author | serge.fonville |
Post date | 2008-02-25T12:34:52Z |
--- In Firebird-Java@yahoogroups.com, Roman Rokytskyy
<rrokytskyy@...> wrote:
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();
System.load(libraryPath);
Altough this makes the application no longer platform independant, a
work around should be possible (e.g System.getProperty("os.name"))
<rrokytskyy@...> wrote:
>have a
>
> > I read somewhere (IIRC) that it should be somehow possible to
> > jdbc driver that doesn't need dll's or anything and would make itto the
> > possible to do all connecting to the database from pure java
> > (somthing with JDBC 4).
>
> You have confused something. Jaybird implements the wire protocol
> server in Java, but it can't access the database file from Java. Inprocess
> other words, when you have running Firebird server (a standalone
> that listens to the network socket), you can use pure Java driverand
> you don't need DLLs.access
>
> But this won't replace you the Firebird Embedded if you want to
> the database file from Java - Jaybird driver has no idea what isstored
> in the file, no idea how to execute SQL, it just translates theJDBC API
> into native Firebird API.create
>
> > 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 dumpThe last thing I have discoverd (not really specific to Jaybird):
> > 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
>
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();
System.load(libraryPath);
Altough this makes the application no longer platform independant, a
work around should be possible (e.g System.getProperty("os.name"))