Search code examples
javasocketsservletsrmihost

Host Java Server using Socket Communication


I need some guidance over here.

I managed to get my java server working, running a java thread listening for client socket communications, all the business logic is inside my java code.

I also managed to get multiple clients connected and everything went fine. The clients use a Swing Application to connect with my Java Server, both the server and the client are individual java projects, .jar files.

Now I was looking to host the server on some free hosting environment, I already looked at Google App Engine, but it seems that it works only for servlets right?

Is it possible to turn accept tcp socket connection on servlets? I know that normally servlets are for HTTP connections, to show Java Server Pages for clients.

I also looked at RMI, Remote Method Invocation, but where can I host an RMI server? I am looking for a free hosting, I dont need much bandwidth, 1GB is enough, maybe less..

There must be a service for what I am looking .

Thanks in advance ;)


Solution

  • To run a custom server of your own you're going to need VPS and those are not free. Some services such as Amazon have a free usage tier though so you can get started without extra costs.