S
stanislav.tomic
Hi people out there 
that's my first time in a diskussion-group. Let's see if it works.
I have a question concerning properties-files in Java.
Writing in a properties-file and reading out of the file is working as
long as I don't put my files in a JAR.
The adventureous part of the programm is that I'm trying to make an
application which should be able to remember user-settings (write
values in properties-file) and load them (read out values of
properties-file) when started next time.
I've tried different things, but I don't understand how to combine
UPDATEABLE properties-files with JAR-archives? (How to put a
properties-file in a JAR and write new values into it during
runtime.) Reading is possible with different streams, but where is
the sense of a properties-file if I can't add new data to it, while
the application is running. Is there another way of saving properties
which are necessary for the application? Of course the solution should
only use relativ paths, to make sure that the user is able to access
it.
I would prefer to have my files in a JAR, cause it's easier to
distribute. (The user just has to unzip a ZIP-archive, which includes
a folder with the necessary libraries and a JAR-file with my classes.)
So, that's the problem which I'm trying to solve in the last couple of
days. Is anybody out ther, who can explain me how to solve that
problem?
Thanks in advance for your help,
Stani.
that's my first time in a diskussion-group. Let's see if it works.
I have a question concerning properties-files in Java.
Writing in a properties-file and reading out of the file is working as
long as I don't put my files in a JAR.
The adventureous part of the programm is that I'm trying to make an
application which should be able to remember user-settings (write
values in properties-file) and load them (read out values of
properties-file) when started next time.
I've tried different things, but I don't understand how to combine
UPDATEABLE properties-files with JAR-archives? (How to put a
properties-file in a JAR and write new values into it during
runtime.) Reading is possible with different streams, but where is
the sense of a properties-file if I can't add new data to it, while
the application is running. Is there another way of saving properties
which are necessary for the application? Of course the solution should
only use relativ paths, to make sure that the user is able to access
it.
I would prefer to have my files in a JAR, cause it's easier to
distribute. (The user just has to unzip a ZIP-archive, which includes
a folder with the necessary libraries and a JAR-file with my classes.)
So, that's the problem which I'm trying to solve in the last couple of
days. Is anybody out ther, who can explain me how to solve that
problem?
Thanks in advance for your help,
Stani.