Subject Re: Develop Java Application with Embedded Server
Author serge.fonville
--- In, Roman Rokytskyy
<rrokytskyy@...> wrote:
> > If i specify the absolutepath I get an error stating jaybird21
> > not be found in java.library.path.
> This is ok, since on Windows java.library.path uses the %PATH%
> On Linux it is $LD_LIBRARY_PATH.
> > When I add the directory where jaybird21.dll is located to the
> > path path I get the error:
> > GDS Exception. 335544344. I/O error for file CreateFile (open) ""
> > Error while trying to open file
> > null
> > Reason: I/O error for file CreateFile (open) ""
> > Error while trying to open file
> > null
> Strange. Please post your code to obtain the connection (incl. the
> > I think this implies two things: The jaybird21.dll should somehow
> > visible through the path to java (no portability there, I'm
> > unless it is possible to define java.library.path from inside the
> > java source
> You can define the java.library.path when starting the JVM, but I'm
> afraid there's no such possibility at runtime via
> System.setProperty(String, String) call (though, I didn't try, but
> general case it won't work since the security manager will prevent
> from doing this).
> > and I need some sort of tool to create the database file.
> That is easy:
> FBManager manager = new FBManager("EMBEDDED");
> manager.start();
> manager.setForceCreate(true);
> manager.createDatabase(yourAbsolutePath, userName, password); //
> embedded - any user/pwd
> Roman
Very useful Roman, thx

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). What is the current status, since this would
make it very feasible to make a portable application. Say I create
exe files for windows and sh script for *nix and I just dump
everything in one directory and the application 'just works'

I have it working now (not quite as I hoped, but still....)

I copied everyting from the jaybird archive to a subdirectory of my
Added all jars to eclipse
Added the path to the jaybird21.dll in the system path
create a database with isql.exe
and now there are no more connection errors

Thank you very much for all your help.

I had already searched far and wide and could not find a suitable
solution. People like you make learning fun again :D

Serge Fonville