X
X
xDan12017-05-10 00:42:42
Java
xDan1, 2017-05-10 00:42:42

How to run java program on hosting?

I have a Maven project in Intellij idea with a java program. If I run it through the IDE, everything works as it should, but I need to upload this program to the hosting and run it there. After several attempts, I realized that I did not know much. There are several questions:
1) Should hosting support java?
2) Which file do I need to get from my .jar or .war project? And how to create it correctly with Intellij idea?
3) How to run this program there? (on hosting)

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Serezha, 2017-05-10
@xDan1

1. VDS with Linux, put java there
2. jar
3. java -jar filename.jar

S
Sergey Gornostaev, 2017-05-10
@sergey-gornostaev

To begin with, you should familiarize yourself with the theory more closely, read how exactly servlets, JSP and JSF work. After reading, you will understand that for their implementation you need at least a web container. Two of the simplest and most popular are Apache Tomcat and Jetty. You should download them, install them on your computer, read their documentation, play with the settings, try deploying your applications manually. Then you can get acquainted with the concept of "application server" and learn about other types of containers. Also download a couple of the most popular - Glassfish and Wildfly, play with their settings, try to deploy your applications in them. After everything works out on your local computer, you can buy a VPS and install on it the server that you liked best during the experiments.

S
svlugovoy, 2017-05-10
@svlugovoy

Read what https://www.heroku.com/ is or buy a Linux virtual machine from a hoster monthly (for example , https://uahosting.com.ua/vps.php). There you set up all the Java environment yourself, deploy your application and voila - it is available via ip:port. Good workout, I recommend. Next, smoke what is gitlab, jenkins, docker, in general, there is still a lot of interesting things ahead. Good luck!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question