how can i deploy the jar file in remote server

learn program

In my local machine, i just running the java application in eclipse and working perfectly.

But in my staging machine, i have a spring boot application and running in the centos server, which i am accessing by putty

when i tried running the command

> mvn clean package -DskipTests

after the above step, what the next step, i need to do

Actually i did was,

nohup java -jar target/cs.jar &

so that, jar was created in the target folder. Then when i tried to hit the endpoint from the postman its not working

Anjan Dash

As you said there might be some internet issue on the Staging Server. Maven may try to get dependencies from internet, but since it is not able to get to internet it is hanging.

Can you try to use following command on your linux server

$wget http://www.google.com 

if it works correctly then you know that internet is there on that machine. Your maven should work then .

If not then, I would suggest build the whole thing on your local and transfer the build files to the server. In the server you can just execute

$ java -jar target/myproject-0.0.1-SNAPSHOT.jar

I am assuming that you can package the whole application in a jar file. To move the jar file from windows machine to server machine you can use winscp tool.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to deploy a java jar file to remote server through maven

How to Deploy a jar File on a remote server from within Netbeans?

How can I Configure localhost and remote server with single config file

how can I run python file in remote server using Paramiko?

How can I jq a line from a file from a remote server?

How can I deploy from within STS 3.5.1 (Spring Tool Suite) to a remote GlassFish 4 server?

How can i auto deploy with gitlab-ci.yml on a remote server without GitLab Runner?

How can I deploy a local server easily?

How to deploy created .jar file in Apache Tomcat server in Eclipse IDE?

How can I deploy and execute an application on a device connected to a remote system?

How can I send a zip file from local to remote and save it to remote directory when connecting directly to remote server is not an option?

how to deploy jar file to azure?

How to deploy the sources file with the jar using deploy:deploy-file

How can i read a remote file in nodejs?

How can I add files to a Jar file?

How can i run a .jar file in java

How can I make a .jar file executable?

How can I execute a jar file?

How can I copy file from local server to remote with creating directories which absent via SSH?

How can I fetch a list of file names from a Remote Server via FTP?

Deploy Jar to remote server from Jenkins Build Job

To deploy django project in heroku server when I use in settings file DEBUG = False then image not work. How can I solved this problem?

How can I use Git/GitHub to deploy a discord.js bot to a remote server (that I own and is on my network) without having to manually FTP into it

How can I deploy my custom dhcp server on docker?

How can I deploy a local SQL Server database for a Winforms app

How to reliably deploy a game server jar to a machine?

How can I exclude a file from deploy in gcloud?

UWP app: How can I deploy updatable Json file?

How can I remotely deploy a flow file in Node-RED?