2
我想运行教程here以开始使用Dropwizard。 所有的事情都很好,直到我通过这个命令来运行它:无法运行Dropwizard教程
java -jar target/hello-world-0.0.1-SNAPSHOT.jar server hello-world.yml
正如预期的那样,应该
INFO [2011-12-03 00:38:32,927] io.dropwizard.cli.ServerCommand: Starting hello-world
INFO [2011-12-03 00:38:32,931] org.eclipse.jetty.server.Server: jetty-7.x.y-SNAPSHOT
INFO [2011-12-03 00:38:32,936] org.eclipse.jetty.server.handler.ContextHandler: started o.e.j.s.ServletContextHandler{/,null}
INFO [2011-12-03 00:38:32,999] com.sun.jersey.server.impl.application.WebApplicationImpl: Initiating Jersey application, version 'Jersey: 1.10 11/02/2011 03:53 PM'
INFO [2011-12-03 00:38:33,041] io.dropwizard.setup.Environment:
GET /hello-world (com.example.helloworld.resources.HelloWorldResource)
INFO [2011-12-03 00:38:33,215] org.eclipse.jetty.server.handler.ContextHandler: started o.e.j.s.ServletContextHandler{/,null}
INFO [2011-12-03 00:38:33,235] org.eclipse.jetty.server.AbstractConnector: Started [email protected]:8080 STARTING
INFO [2011-12-03 00:38:33,238] org.eclipse.jetty.server.AbstractConnector: Started [email protected]:8081 STARTING
,但我刚刚
usage: java -jar hello-world-0.0.1-SNAPSHOT.jar [-h] [-v] {server,check} ...
positional arguments:
{server,check} available commands
optional arguments:
-h, --help show this help message and exit
-v, --version show the application version and exit
没有别的。它无法运行! 我正在尝试Windows 10 64bit,Java 1.8.0_65和DropWizard 0.9.2。 任何人都可以提出任何关于这个问题的线索吗?谢谢!
这个程序是100%的Java和我只是跟着描述正是教程。 –
哦,对不起,我的失踪。以下是'java --help'的输出: 无法识别的选项:--help 错误:无法创建Java虚拟机。 错误:发生了致命异常。程序将会退出。 –
你可以分享一下'hello-world.yml'的内容吗?它可以放在你运行java命令的同一个目录下吗? – Mahendra