Does Java Web Start provide a default folder?

Does Java Web Start have a default location for storing and accessing data related to my program? Or do I need to create a folder? For Java Web Start (provided that I do not receive the program folder), it is standard to simply create applications for mac, etc. in the Program Files for window, etc.

+4
source share
3 answers

I would use a subdirectory in the users home directory. For instance. System.getProperty ("user.home") + File.separator + ".myapp /"

But for this, the user needs to add additional permissions for the web launch application.

To save, you can use the properties file or XmlEncoder, which are included in the JDK. Or use external libraries like XStream , Xvantage or a simple structure where it is simple, like

xstream.save(anyObject) 
+3
source

In addition to the settings API for storing user settings, there are several services that can be found in the javax.jnlp package .

PersistenceService is especially useful for your specific requirement.

Alternatively, you can simply provide all the data that your application requires as part of your .jar files, specify them in your .jnlp file .jnlp and configure how and when they are downloaded using DownloadService .

+2
source

There is no special default location for storing and accessing data associated with your program using webstart. However, Java does have a settings API to provide the platform with an independent way to save the configuration without worrying about the specific storage location / format.

0
source

All Articles