简体   繁体   English

如何在Amazon AWS中部署可运行的jar?

[英]How do I deploy a runnable jar in Amazon AWS?

I have an android client who sends a sentence to the server. 我有一个Android客户端,它向服务器发送一个句子。 Now this server does some processing and sends the string back to the Android client. 现在,该服务器进行一些处理,并将字符串发送回Android客户端。 I'm using basic client server communication for this, and it is working fine on the local machine. 我正在为此使用基本的客户端服务器通信,并且在本地计算机上工作正常。 Now I want my server code to be deployed on a server so that I can provide that server address to my client code. 现在,我希望将服务器代码部署在服务器上,以便可以将该服务器地址提供给客户端代码。 The server is not a web app, it's a simple core Java project. 该服务器不是Web应用程序,而是一个简单的核心Java项目。 As far as I understand, I'll have to deploy it as a runnable jar. 据我了解,我必须将其部署为可运行的jar。 But how do I do that using AWS? 但是如何使用AWS做到这一点呢?

Set up apache tomcat and use the deployment endpoint , namely /manager/text/deploy?path=/footoo&war=file:/path/to/foo.war to deploy the war. 设置apache tomcat并使用部署终结点 ,即/manager/text/deploy?path=/footoo&war=file:/path/to/foo.war部署战争。

If you'd rather deploy a runnable jar, set up an instance, install java on it, and put the jar onto said instance, before going in and using java -jar runnable-foo.jar in a screen session . 如果您想部署一个可运行的jar,请设置一个实例,在其上安装java,然后将该jar放在该实例上,然后再在屏幕会话中使用java -jar runnable-foo.jar

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM