save files without signing

is it possible to save data files to a computer without signing the jar?

is there like a special folder that can be accessed in the sandbox?

cause I would not like to have the player have to have big download every new version.

it owuld also be nice if there could be custom maps for my game. but that wont work out unless there is a way to save them to harddrive.

There is very limited data storage when using WebStart Muffins (like Cookies in a browser)

If you want more, just sign the darn thing.

Webstart Muffins? Il google it.

I know I could sign it, but how many times has someone said “why did you have to sign it, I dont like to play signed games because…”

EDIT:

also, are webstart muffins pausible in applets?

well, I just found out that javax.jnlp does not exist ???

what kind of data do you want to store ? user specific data or just cache some stuff ?

in order to use that package you have to add jnlp.jar to your java class path or ide, which is found in your jre lib folder. (added automatically when using java webstart or jnlp applets).

I got around this by having the program send data to a php script that would save to a file on the server. This method has the added advantage that users can play the saved game from any computer. This method has the downside that it increases data transfers and space used on the server.

that was nearly the reason of my previous question for user specific data save to server is not that bad : client side you only have to put a cookie with a unique ID and serverside save data linked to this ID.

Have you tried looking at FileOpenService and FileSaveService?

http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/examples.html#FileOpenService

If it used JFileChooser, it’s unusable. You can’t even properly navigate through directories with it. A double-click will make you rename the directory, a single click will select it, and hitting ENTER will not open it, but return it as the result. see this thread, or use google

After all these years, Sun has never been able to reproduce this bug – and amazingly, sometimes it all works, but heck… it’s unusable to let end users play with it - it’s quite often that I can’t traverse any directory.

So let’s hope it uses java.awt.FileDialog but that’s rather unlikely…

It does indeed appear to use the standard JFileChooser dialog. I haven’t had much trouble with it myself, except for being painful trying to navigate to folders on a different drive to the current one.

would kinda defeat the purpose…

You could load the map files from the server.

What does JavaFX use? It doesn’t need to be sign to use its hidden storage.

once again, that would defeat the purpose.

Have you looked at the Preferences API (java.util.prefs.Preferences). I don’t know if a sandboxed applet can use it, but it is worth a shot.

I am not suer, but I dont think taht can handle real data, but it rather for saving passwords and such.

It can store any primitive, String or array of bytes. So if you can convert your data to an array of bytes then you can store real data up to 8K per key for a String and 6144 bytes for a byte array.

by comparison about how many characters is 6144 bytes?

thx this might actually work :slight_smile:

java.util.prefs.Preferences is not available for unsigned apps.