It's possible in the hibernate.cfg.xml file read data from a .txt configuration file? My intent is that in my JAVAFX application I can leave the server ip address of to be populated by my client. If possible, how do I add this file inside the artifact using IntelliJ IDEA?
Asked
Active
Viewed 139 times
0
-
1[This post](https://stackoverflow.com/a/3784695/2991525) should provide you with a way to come up with a location that works independent from the working directory the program is started from. You could simply store the settings there. Probably you should not go with an artifact, since you wouldn't want the file to be included in a jar file (it's not editable this way). – fabian Jun 23 '17 at 04:49
-
Thanks @fabian, really i dont' want the file be not editable, but the only way is copy the file manually? Or exists another way to add the file with the installation? – JamesOrtiz Jun 23 '17 at 05:10
-
1Java programs are not really installed. You install the jre and pass the .class files to it (maybe packaged as an `.jar` archive). I suggest including a settings export/import feature to your program that your users can use to save the settings to a location they like and allow them to import those settings for another user/pc/... (which could be as simple as copying the file to the directory where you store your settings). – fabian Jun 23 '17 at 13:18