Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (523)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Storing state with web start/jnlp  (Read 1781 times)
0 Members and 1 Guest are viewing this topic.
Offline mike_bike_kite

Senior Devvie


Medals: 1
Projects: 2



« Posted 2012-08-26 08:33:47 »

I have a few java applets i've converted to web start. The only thing that's stopping me at the moment is how to store the applications state on a given computer. I don't want any special permissions. I just want to store a string that's approx 200 char long. Is there an easy way and can anyone point me to a simple example?

Many thanks.

Mike

PS I believe it can be done with cookies in the sandbox but I simply didn't understand anything that I found  Huh

Arcade swarm
Board Chess - Checkers - Othello
Offline ra4king

JGO Kernel


Medals: 355
Projects: 3
Exp: 5 years


I'm the King!


« Reply #1 - Posted 2012-08-26 18:44:38 »

Look into Java Muffins.

Offline mike_bike_kite

Senior Devvie


Medals: 1
Projects: 2



« Reply #2 - Posted 2012-08-27 09:39:58 »

Thanks for the suggestion. I'll look into using these.

Who names these things?

Arcade swarm
Board Chess - Checkers - Othello
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline sproingie

JGO Kernel


Medals: 202



« Reply #3 - Posted 2012-08-27 15:34:25 »

They're named after cookies, and in that case, we do know who: Lou Montulli, the engineer at Netscape, who named them after X11's "MIT-MAGIC-COOKIE" auth token.  Where the X11 folks got it from, who knows -- the phrase has been around a lot longer than X11 has.  If X had come out of the UK, I suppose we'd be calling them "magic biscuits" instead.
Offline mike_bike_kite

Senior Devvie


Medals: 1
Projects: 2



« Reply #4 - Posted 2012-08-29 20:11:05 »

I must admit I got stuck on the first hurdle using muffins (the persistence service). The examples state "import javax.jnlp.*; " but that immediately raises a not found error. I found out elsewhere that it's included somewhere in the source but it gave no clear example of how to actually use it.

I'll admit I'd prefer it if they had a simple class I could import that simply allowed you to get or store name value pairs for your given URL. I'm currently writing things back to the server but it's a PITA Smiley I guess these developers spend more time coming up with a cute name (and never a name you could hope to guess in google) than provide a simple interface that numb-skulls like me can use.

Mike

Arcade swarm
Board Chess - Checkers - Othello
Online kappa
« League of Dukes »

JGO Kernel


Medals: 78
Projects: 15


★★★★★


« Reply #5 - Posted 2012-08-29 22:20:33 »

You need to add the javaws.jar to the classpath to be able to use such classes in an IDE (its automatically added when using Java Web Start). The jar can be found in the lib folder of the jre directory.
Offline mike_bike_kite

Senior Devvie


Medals: 1
Projects: 2



« Reply #6 - Posted 2012-09-15 20:14:06 »

You wouldn't have a simple example of how to do this would you?
I've only ever built my stuff using standard classes.

... pretty please

Arcade swarm
Board Chess - Checkers - Othello
Offline ra4king

JGO Kernel


Medals: 355
Projects: 3
Exp: 5 years


I'm the King!


« Reply #7 - Posted 2012-09-15 20:22:40 »

Right click your project -> Build Path -> Configure Build Path -> "Libraries" tab -> Add External JARs... -> Go to your java installation folder and find "javaws.jar" in the "lib" folder -> Ok Smiley

Offline mike_bike_kite

Senior Devvie


Medals: 1
Projects: 2



« Reply #8 - Posted 2012-09-15 23:34:30 »

Ahhh - I suspect you live in the modern world. Where I live, I have vi to edit the files and compile in the command window (XP) using :
1  
2  
3  
> javac diamond_v55.java
> jar -cfm diamond_v55.jar Manifest.txt *.class *.png *.wav *.ico
> java -jar diamond_v55.jar
Is there anything I can do using these sort of commands?

Mike

Arcade swarm
Board Chess - Checkers - Othello
Offline ra4king

JGO Kernel


Medals: 355
Projects: 3
Exp: 5 years


I'm the King!


« Reply #9 - Posted 2012-09-15 23:54:21 »

1  
2  
3  
[code]
javac -cp <class path> ...
java -cp <class path> ...

just put the path to the jar there! Smiley[/code]

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

SHC (22 views)
2014-11-25 12:00:59

SHC (20 views)
2014-11-25 11:53:45

Norakomi (18 views)
2014-11-25 11:26:43

Gibbo3771 (22 views)
2014-11-24 19:59:16

trollwarrior1 (36 views)
2014-11-22 12:13:56

xFryIx (74 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50

digdugdiggy (46 views)
2014-11-12 21:10:15

digdugdiggy (41 views)
2014-11-12 21:09:33

kovacsa (67 views)
2014-11-07 19:57:14
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!