在IDE中运行Vertx [英] Run Vertx in an IDE
问题描述
vertx run server.java
从命令行,但是有没有办法从IDE中运行server.java文件?
-
创建一个maven项目作为手册说。
-
然后将项目导入为Maven项目
- p>使用主类创建一个新的启动器(Eclipse)
- 对于Vert.x 2.x: org.vertx .java.platform.impl.cli.Starter
- 对于Vert.x 3.x: io.vertx.core.Starter
-
在程序参数选项卡中键入:运行your.package.ServerVerticle -conf conf.json
如果你没有使用 conf.json 有一个,这只是一个例子,告诉你,你可以放在那里呃选项你可以从命令行启动Vert.x。
PRO TIP:如果你的垂直线是用其他语言编写的,请使用具有如下语言名称的前缀:
- 运行scala:com.acme.MainVerticle -conf conf.json
- 运行jython:MainVerticle.py -conf conf.json
- 运行jruby:MainVerticle.rb -conf conf.json
- 运行犀牛:MainVerticle.js -conf conf.json
-
- 运行groovy:MainVerticle.groovy -conf conf.json
等等。
Is there any way to run Vertx from within an IDE? I know I can create a server in a file and then call
vertx run server.java
from the command line, but is there a way to run the server.java file from within an IDE?
create a maven project as the manual says.
Then import the project as Maven project
Create a new launcher (Eclipse) using as main class
- For Vert.x 2.x: "org.vertx.java.platform.impl.cli.Starter"
- For Vert.x 3.x: "io.vertx.core.Starter"
In the tab "Program Arguments" type: "run your.package.ServerVerticle -conf conf.json"
You can omit the conf.json if you don't have one, it's just an example to show you that you can put there any other option you'd put launching Vert.x from the command line.
PRO TIP: if your verticle is written in another language, use the prefix with the name of the language as follows:
- "run scala:com.acme.MainVerticle -conf conf.json"
- "run jython:MainVerticle.py -conf conf.json"
- "run jruby:MainVerticle.rb -conf conf.json"
- "run rhino:MainVerticle.js -conf conf.json"
- "run groovy:MainVerticle.groovy -conf conf.json"
And so forth.
这篇关于在IDE中运行Vertx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!