Subject | Re: Develop Java Application with Embedded Server |
---|---|
Author | serge.fonville |
Post date | 2008-02-21T10:13:15Z |
--- In Firebird-Java@yahoogroups.com, 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). 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
project
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
<rrokytskyy@...> wrote:
>could
>
> > If i specify the absolutepath I get an error stating jaybird21
> > not be found in java.library.path.values.
>
> This is ok, since on Windows java.library.path uses the %PATH%
> On Linux it is $LD_LIBRARY_PATH.system
>
> > When I add the directory where jaybird21.dll is located to the
> > path path I get the error:JDBC URL)
> > 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
>be
> > I think this implies two things: The jaybird21.dll should somehow
> > visible through the path to java (no portability there, I'mafraid),
> > unless it is possible to define java.library.path from inside thein
> > 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 preventyou
> from doing this).for
>
> > 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/pwdVery useful Roman, thx
>
> Roman
>
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
project
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