Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (675)
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  
  passing parameter via webstart  (Read 4391 times)
0 Members and 1 Guest are viewing this topic.
Offline misterX

Junior Devvie

java forever!

« Posted 2004-02-04 09:20:24 »


is it possible to:
1) give parameters in the link to the jnlp file so that the app will be started with these arguments
2) have a jnlp file including parameters in it so that the app will be started with these arguments

The aim would be to make some sort of:

Offline tom
« Reply #1 - Posted 2004-02-04 09:47:23 »

nr 2 is possible. Check out the jnlp file syntax:

<application-desc main-class="Main">

arg1 and arg2 will be the parameters sent to "public static void main(String args[])"

Offline misterX

Junior Devvie

java forever!

« Reply #2 - Posted 2004-02-04 16:01:49 »

...then, is it possible to create temporary jnlp files on request (on the server side)?
1. send a request to html, servlet or something else
2. It handles request by sending back a custom made jnlp file.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline cfmdobbie

Senior Devvie

Medals: 1

Who, me?

« Reply #3 - Posted 2004-02-04 16:31:31 »

Sure - you can dynamically generate one, just like any normal dynamic page.  Just make sure you set the file type correctly, and if you want to hard-code it, you can just out.println() the XML to the client.

Hellomynameis Charlie Dobbie.
Offline misterX

Junior Devvie

java forever!

« Reply #4 - Posted 2004-02-04 17:19:28 »

...well... i'm a bit nowhere in this area.
well, do you mean using php? or something similar? that case, could help me out by giving me a small example how to write such a file (non html)?
Offline Orangy Tang

JGO Kernel

Medals: 57
Projects: 11

Monkey for a head

« Reply #5 - Posted 2004-02-04 17:33:11 »

php, perl, or any other server side code could automagically generate a .jnlp for you. It depends what you know and what you have avalible on your host.

But what exactly are you trying to do?

[ - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline misterX

Junior Devvie

java forever!

« Reply #6 - Posted 2004-02-04 17:46:17 »

i'm doing a nasty, horrible, strange patchwork for a smart aim! (at least, i think so!)

The final aim, is to launch multiplayer games via messenger. yes, messenger.

You'll invite somebody like following:
"Mofu wants to play pong with you! click here to play!"
By clicking, it'll call a link => http://.../game.php?ip=

which will create a custom jnlp file including the host IP as argument for the program which will try to connect to it when launched!
Tadam! You click accept and you play!

Well, that's the theory!  Lips Sealed
Offline William Denniss

JGO Coder

Projects: 2

Fire at will

« Reply #7 - Posted 2004-02-05 01:53:42 »

I have a small section in my JWS tutorial about dynamic JWS files:

Passing parameters to JWS can sometimes lead to unexpected results so I use Apache mod_rewrite to pretend that they are all actually seperate JNLP files.  In that example essentially you can specify any class to run it:  Eg if the main class is "CubeTest" then your JNLP is "com.xith3d.test.CubeTest.jnlp" but if it is SphereTest then it is "com.xith3d.test.SphereTest.jnlp".  Those two jnlp "files" actually translate to "com.xith3d.test.php?main=CubeTest" and "com.xithed.test.php?main=SphereTest" - but the user (ie. JWS) never knows.

Hope that helps,


Offline misterX

Junior Devvie

java forever!

« Reply #8 - Posted 2004-02-05 06:02:24 »

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

basil_ (40 views)
2015-09-30 17:04:40

shadowstryker (20 views)
2015-09-29 15:55:06

TheSpaceHedgehog (26 views)
2015-09-29 01:58:48

GamerC4 (50 views)
2015-09-24 21:10:38

GamerC4 (69 views)
2015-09-24 21:09:48

htuy (24 views)
2015-09-24 04:57:24

htuy (34 views)
2015-09-24 04:56:35

htuy (25 views)
2015-09-24 04:56:09

htuy (25 views)
2015-09-24 04:47:33

Roquen (62 views)
2015-09-21 12:54:28
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 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‑
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!