适用于 Windows 的 Jetty 服务器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1523470/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jetty server for Windows
提问by Amit
Can the Jetty server run on Windows-based environments. If there is a Windows installable, can someone please point me to it?
Jetty 服务器能否在基于 Windows 的环境中运行。如果有可安装的Windows,有人可以指点我吗?
回答by Simon David Pratt
I found a good tutorialand the quick start documentationon the installation of Jetty in a windows environment. It's not simply an installer, but you merely unzip the files into a folder and run the command:
我找到了一个很好的教程和关于在 Windows 环境中安装 Jetty的快速入门文档。它不仅仅是一个安装程序,您只需将文件解压缩到一个文件夹中并运行以下命令:
java -jar start.jar
java -jar start.jar
in the folder where you unzipped it to start the server.
在您解压缩它以启动服务器的文件夹中。
回答by OMG Ponies
回答by Sohan
Updated:
更新:
1 – Downloading
1 – 下载
You can download Jetty from two sources: Eclipse or Codehaus.
您可以从两个来源下载 Jetty:Eclipse 或 Codehaus。
http://jetty.codehaus.org/jetty/
http://www.eclipse.org/jetty/downloads.php
2 - Simply uncompress the file to a directory.
2 - 只需将文件解压缩到一个目录。
3 – Running Jetty
3 – 运行码头
Open a terminal. Go to the Jetty installation directory. Enter the following command:
打开一个终端。进入 Jetty 安装目录。输入以下命令:
$ java -jar start.jar
Now open a browser and go to localhost to check if Jetty was installed sucessfully:
现在打开浏览器并转到 localhost 以检查 Jetty 是否安装成功:
http://localhost:8080/
回答by Joker
In case you have jar file created by maven and has all the dependencies you will require following command.
如果您有 maven 创建的 jar 文件并具有所有依赖项,您将需要以下命令。
java -jar XXX.SNAPSHOT.jar server config.yml