Getting resourcess from server-webstart issue

I need to develop a banner rotation system for our game. It is webstart enabled game…so i guess thats all there is to it.
Game has a server to which clients connect to get game data… I need to somehow make a system which can download images/strings to clients machine, store it there and later display(i know the latter ;)).

So if any1 of u has done something simmilar ever, or has idea what to use to implement this in efficient way…all clues and hints are welcome.
Tnx.

P.S If u want to check it out it is in my sig :wink:

You can get images/stuff through the URLConnection class very easy - that’s what I use.

Looks promising, but does it require web server on the server side? We only have our game server up and running there…

Yes - but you have a web site anyway (http://www.b92.net/sport/mundijal2006/arena.php). You upload images to the web site (with e.g. FTP) and then access it simply through http://www.b92.net/sport/mundijal2006/images/Image1.jpg with URLConnection.

Sure…but our game server is on the other machine…I ll look into the code then.

One more question :)-what if there was no web server at all ? :slight_smile:

doesn’t need to be on the same machine.

If there is no web server - I assume you have a game server setup - then just send the image through the game server to the client.

OK, thats all clear…but since client is webstarted, how to store image? Muffins? Anything else more convenient? :slight_smile:

I tend to store the images in a .jar file. So, when you start your game through web start, the images/resources.jar is downloaded automatically too. Just add it to the list of required .jar files. Accessing the images/resources in the .jar is easy.

Sure storing in jar is the most easier…but then i have to change the jnlp right? And when it gets changed, then all previously downloaded files will have to be downloaded again…i guess :)-i dont want that :slight_smile:

Java tends to cache .jar files, so you will only download new/updated jar files. ;D

That is correct, but i think that when jnlp is changed, all will get installed again as another app i think…correct me if i m wrong.

ARgh argh argh. Stupid forums. Sorry, apparently I clicked modify instead of Quote. Sorry, sorry, sorry!

OK: you are wrong :). As stated previously (and in fact one of the main points of webstart) it only downloads the files that have changed.

EDIT: ever wonderd why webstarts include the href to the jnlp? its so that you can completely change the jnlp name / location but webstart will know its the same app (have tried this many times, it works)

:slight_smile: Tnx for the info. I guess that i will stick to the jars then…though i still think that they arent that convinient for banner system…there might be big number of jars…could create a mess maybe…

of course they aren’t convinient… use web server and load images from them, why are you rejecting this solution?

Yes, the images should be on the server and you use URLConnection to access them …

Hehe…on contrary…i want this solution. I just want to know what is the best way to store thos images on the client-dont want to dwnld al over again. Are muffins good choice?Any other?Dont remember client is webstart app.

ok then, just save the image after you download it … I’m sure you already thought of that… good luck with your sponsors

Sure i will save it :stuck_out_tongue:

But whats the most convenient way? Muffins?

I’m not sure of what do you mean by Muffins ? I only know Jars…