Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (670)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
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 5039 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.

IanParcs (36 views)
2016-04-18 14:18:53

KaiHH (36 views)
2016-04-18 08:35:41

KaiHH (67 views)
2016-04-15 12:43:58

theagentd (69 views)
2016-04-14 02:16:17

theagentd (76 views)
2016-04-14 02:15:43

IanParcs (92 views)
2016-04-12 03:51:16

IanParcs (37 views)
2016-04-12 03:50:03

IanParcs (33 views)
2016-04-12 03:49:54

IanParcs (30 views)
2016-04-12 03:49:52

IanParcs (39 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 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!