Subject Re: [Firebird-Java] "ini-files" in Java
Author Peder Skånning
Thanks!

I got the java.util.pref.Preferences to work. It was quite easy.

When I run my code the login dialog appears several times. It seems like
the init part of the Database Class is run several times. How do I control
creation order and order of events in Java?

Peder

Ruslan wrote:
Hello.
Where are many way in java to store settings-like data.
In your case, simplest, I think, will be use java.util.pref.Preferences
class. It was designed specially for such cases, and gives you the the
chance to store you settings without taking in mind the details. Actually,
on Win32 jdk implementation data really stored in regestry (if security
policy allows it). On unix-like machines, I think (but not sure) it will be
some sort of config-files. Take the look on javadoc for this class --
usage is very easy.
Good luck!
Ruslan.

----- Original Message -----
From: "Peder Skånning" <PAX@...>
To: <Firebird-Java@yahoogroups.com>
Sent: Friday, May 13, 2005 5:29 PM
Subject: [Firebird-Java] "ini-files" in Java


> Hi!
>
> I am building a Java application as a frontend to a Firebird Database. The
> ConnectionDescriptor is compiled into the binary, which is deployed with
> the
> customer. In Win32 applications I usually store the ConnectionDescriptor
> in
> an ini file or in registry, so the customer can cnange server or path
> without a recompile of the application.
>
> In my Java application i have tried to store the ConnectionDescriptor in a
> text file "connection.txt", which I put in the same directory as the
> application. I works if the path is not to tricky (spaces or volumes on
> UNC
> like paths are tricky in Java).
>
> Is there a standard way to store settigns like the registry in Java?
>
> I have put the Connection and all the SQL in a dbClass. Durint
> initialisation I replace the ConnectionDescriptor with the contents of
> "connection.txt". However it is hard for me to do this replace before the
> application tries to connect with the original ConnectionDescriptor. How
> do
> I affect the creation order in the application? I build with jBuilder2005.
>
> Thanks
>
> Peder
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>




Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/Firebird-Java/

To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.