Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (686)
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  
  RMIregistry + web ?  (Read 3675 times)
0 Members and 1 Guest are viewing this topic.
Offline misterX

Junior Devvie

java forever!

« Posted 2002-12-06 15:58:20 »


i'm currently experiencing with RMI and find it's very nice!
After i've written a multiplayer connect 4 game (working well... On one machine at least!)
I was wondering how to make it work on the web...
The issue is that the RMIregistry must be run on the server! Of course, i can't run it on a web hoster!
So what can i do? Is there a possibility to make the app work without running the registry or any other way to make it run?
Offline Themroc

Junior Devvie

« Reply #1 - Posted 2002-12-06 16:25:09 »

Hm ... a simple web hoster won't run any java app for you anyway, regardless of RMI. Most offer only php, perl, python and some offer java servlets. If you want to run a java app you probably have to  rent your own server or at least a server with a virtual linux env that you can configure yourself.
If the hoster is stupid then you can start your own long-running taks through CGI, but most disable that.
Offline Herkules

Senior Devvie

Friendly fire isn't friendly!

« Reply #2 - Posted 2002-12-06 16:42:05 »

You could e.g. start your client via WebStart and let once of the clients be the RMI registry. Of course, this makes matchmaking very hard bc. the InetAdr of the reg. has to be known.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline nabetse

Senior Newbie

I love YaBB 1G - SP1!

« Reply #3 - Posted 2002-12-06 16:51:06 »


  if you had a dedicated IP address, your computer could be the server of your game. The problem is that your computer would be running for all the day (and  the night, optional). The game client will connect with your server and you wouldn't depend on strange server.
    But, if you know someone that allows to run your server, please tell me, because I'm in the same situation.
Offline misterX

Junior Devvie

java forever!

« Reply #4 - Posted 2002-12-06 17:08:24 »

hmm... yeah, you're right -damn i forgot my head-, rmi or not, running the server app will be a problem... and i'm not fond on running the server on my machine...

With this simple notice, the situation and the issuechanged.
In case of a "peer-to-peer architecture", how can i do to... before i continue, i prefer to say that i've absolutely no knoweldge about cgi, perl or whatever.
let's go on, when peer-to-peer, running the game should not be a problem since it'll be on locale machines, same with the registry.
The whole problem is to bring the 2 players together out of the web.

I've no idea of the way to start...
Before, in order to start a game, you needed to "invoke" a method like host.join(this) and the game launched...
The 'host' was got via a server, a sort of main portal to lookup wich stores the people logged in.

Without such a main server, how to find, lookup to apparently unknown hosts?

Hmm... I hope i'm clear enough...
PS: i'm going to look at WebStart in a near future, but i'm not knowing it at all yet.
Offline misterX

Junior Devvie

java forever!

« Reply #5 - Posted 2002-12-06 18:01:54 »

    But, if you know someone that allows to run your server, please tell me, because I'm in the same situation.

Sorry, i dond't know anyone...  Seems to be a common problem.
Offline nabetse

Senior Newbie

I love YaBB 1G - SP1!

« Reply #6 - Posted 2002-12-06 18:02:24 »

You have said the solution. It's possible to make a java application that connects with a web server (servlets) . Then you could create a new game or join to an existing one. But you should have a database connection in server side to store these games. I recommend to look this free web server (
I send you a small piece of code which I used to connect with the server in a java application:

// We connect with the server and send "url" string with the query
       URL url_connetion=new URL(url);
       HttpURLConnection hc = (HttpURLConnection)url_connetion.openConnection();
       in = hc.getInputStream();                 // Reading the servelts response

       int contentLength = (int)hc.getContentLength();  
       byte[] raw = new byte[contentLength];
       int length =;


       // Show the response to the user.    
       String sresponse = new String(raw, 0, length);

     catch (IOException ioe) { };

Offline misterX

Junior Devvie

java forever!

« Reply #7 - Posted 2002-12-06 18:40:48 »

...interesting, i'll take a look at it, but it'll take time since i never worked with servlets.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Dwinin (61 views)
2015-11-07 13:29:08

Rems19 (76 views)
2015-10-31 01:36:56

Rems19 (68 views)
2015-10-31 01:32:37

williamwoles (103 views)
2015-10-23 10:42:59

williamwoles (91 views)
2015-10-23 10:42:45

Jervac_ (105 views)
2015-10-18 23:29:12

DarkCart (131 views)
2015-10-16 00:58:11

KaiHH (113 views)
2015-10-11 14:10:14

KaiHH (153 views)
2015-10-11 13:26:18

BurntPizza (166 views)
2015-10-08 03:11:46
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

Rendering resources
by Roquen
2015-10-15 07:40:48

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 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!