Maneesh Godbole wrote:If your home computer has a public IP, you can still run the server on your machine and your friend can access it.
Else you might want to consider something like http://aws.amazon.com/ec2/
Ulf Dittmer wrote:There is no particular problem in doing this - the server needs to run on a machine that's accessible to the both of you. Any server obtained from a Java hosting provider should do.
sashwat kumar padhy wrote:
I found my public ip from this site : http://ip.w69b.com/ Which means my lappy has a public ip right? Then i ran the server program from cmd as usual. And ran the client program on another lappy,changing the ip there,to this public ip. And it didn't work! Should i compile my server program in some different manner like changing ip manually or some stuffs like that?
sashwat kumar padhy wrote:if i host it in a server,then after uploading it to that server how to compile the java program?
How to execute the program file on server?
Depends on what kind of server you get. If you get Java web app hosting, then you could start the server from a ServletContextListener (I assume the server opens some specific port to listen). Make sure the hosting supports opening ports. If you get a complete server (or virtual server), then there should be no problem running any Java code as a daemon.
Ulf Dittmer wrote:I see no indication that the service you'd get there supports Java. Generally, Java hosting is not free - you should be prepared to pay the equivalent of $5-10 per month for basic Java hosting.
"
| With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |