Subject | Re: [Firebird-Java] Re: Develop Java Application with Embedded Server |
---|---|
Author | Roman Rokytskyy |
Post date | 2008-02-18T11:40:36Z |
> If i specify the absolutepath I get an error stating jaybird21 couldThis is ok, since on Windows java.library.path uses the %PATH% values.
> not be found in java.library.path.
On Linux it is $LD_LIBRARY_PATH.
> When I add the directory where jaybird21.dll is located to the systemStrange. Please post your code to obtain the connection (incl. the JDBC URL)
> 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
> I think this implies two things: The jaybird21.dll should somehow beYou can define the java.library.path when starting the JVM, but I'm
> 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
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