For Java Web Start is there a default place to store and access data related to my program? Or do I need to create a folder? For Java Web Start (assuming I don't get a program folder) is it standard to just create on in Program Files for window, Applications for mac, etc?
There is no specific default place to store and access data related to your program with webstart. However Java does have the Preferences API to provide a platform independant way of storing configuration without worrying about the specific storage location/format.
In addition to the Preferences API for storing user settings there are a few services that can be found in the javax.jnlp
package.
For your concrete requirement the PersistenceService
would be particularly useful.
Alternatively you can simply provide all data that your application requires as part of your .jar
files, reference them in your .jnlp
file and customize how and when they are downloaded by using the DownloadService
.
I would use a subdirectory in the users home directory. E.g. System.getProperty("user.home") + File.separator + ".myapp/"
But for that the user has to add extra permissions for the a web start application.
To persist you can use a properties file or XmlEncoder which are included in the JDK. Or use external libraries like XStream, Xvantage or the simple framework where it is simple as
xstream.save(anyObject)