Web Start and Game Server
i have a client-server game and i would like to put it on my site
i've managed to put both the client and the server
the problem is when i run the server, i give it a port and it opens and says waiting for a connection, but when a client joins it doesn't detect it
of course, this problem doesn't exist if i run the server jar file from my computer and then run the clients (webstart or console), it's only loading server through web start that it doesn't work
so, if i run the server through webstart, then run a client through command prompt, what happens is it connects, server doesn't display a connection detected message and then client just drops out, seems like the sockets don't connect properly?
thanx
[762 byte] By [
siamakg] at [2007-9-27 14:43:59]

i generated a key and signed the jar file, but it still gives the same error
seems like i need a java.policy file in order to allow connection on the ports >1024?
i made a policy file, but in order to use it, i have to give it as a parameter to the jar file
so, java -jar myjar.jar -Djava.security.policy=java.policy
now, the problem is how to make the jnlp file run my class file with the -Djava.security.policy=java.policy parameter?
the policy file contains:
grant {
permission java.net.SocketPermission "*:1024-65535",
"connect,accept";
permission java.net.SocketPermission "*:80", "connect";
};
on another note...anything launched via JWS is only supposed to be able to create a socket connection back to where it was downloaded from...i think if you made you server app a standalone program (that wasn't started via JWS) your problems may go away (server side anyhow):-)
you are able though to do http/s requests from your apps launched via JWS...
thanx for the replies
ya, i guess there's no easy way to run the server through JWS
it requires a policy file to allow listening on sockets and i can't figure it out ...
my server app is a standalone program and it works fine, i just wanted to make it runnable through JWS
the clients work fine through JWS since they're just connecting to a socket, not listening