Michael A Michael A - 3 months ago 7x
Java Question

Deploying java coded server jar on web

I have coded a Jersey based java server which is all wrapped in one excecutable jar.

I am looking for a web host service in which i can deploy the jar and run it.

I saw some dedicated servers which can do this but this is overshooting the need, any suggestions?


As per your comment I understand that you created a web application with a Jetty embedded server.

I think the best solution for you in this case is to get a virtual machine host, install JRE, upload your *.jar and run it from there. Given firewall permissions and correct configuration you should be able to receive requests on the 80 port. Cons? It costs. A lot.

Most of the Java hosts have already a servlet container running (almost always Tomcat) and you can only deploy your web application in it. Having an embedded Jetty server messes up everything for you.

I strongly suggest you to detach your web application (or as you called it REST server) from Jetty and deploy the *.war in any of the multiple free Java hosts to test it online.


Thanks to you I made a deeper research on the topic and found an interesting guide to deploy a web application with embedded Jetty server in Heroku. I've never tried it nor I know if its free, but maybe you can give a try.