Subject Re: [Firebird-Java] Re: Develop Java Application with Embedded Server
Author Roman Rokytskyy
> If i specify the absolutepath I get an error stating jaybird21 could
> not be found in java.library.path.

This is ok, since on Windows java.library.path uses the %PATH% values.
On Linux it is $LD_LIBRARY_PATH.

> When I add the directory where jaybird21.dll is located to the system
> 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 JDBC URL)

> I think this implies two things: The jaybird21.dll should somehow be
> visible through the path to java (no portability there, I'm afraid),
> 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 in
general case it won't work since the security manager will prevent you
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); // for
embedded - any user/pwd

Roman