如何使用码头源代码启动Web应用程序

发布于 2025-02-05 08:03:16 字数 528 浏览 1 评论 0 原文

直接执行主类后,我有以下问题,

ERROR : No enabled jetty modules found!
INFO  : ${jetty.home} = /Users/zhangsan/git_repo/servlet-container/jetty.project
INFO  : ${jetty.base} = /Users/zhangsan/git_repo/servlet-container/jetty.project
ERROR : Please create and/or configure a ${jetty.base} directory.

Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
       java -jar $JETTY_HOME/start.jar --help  # for more information

我不想从start.jar文件开始。我该怎么办

I have the following problem after executing the Main class directly

ERROR : No enabled jetty modules found!
INFO  : ${jetty.home} = /Users/zhangsan/git_repo/servlet-container/jetty.project
INFO  : ${jetty.base} = /Users/zhangsan/git_repo/servlet-container/jetty.project
ERROR : Please create and/or configure a ${jetty.base} directory.

Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
       java -jar $JETTY_HOME/start.jar --help  # for more information

I do not want to start with the start.jar file. What do I do

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如何视而不见 2025-02-12 08:03:16

您可以生成全JVM命令行,用于使用 dry-run 命令:

java -jar $JETTY_HOME/start.jar --dry-run

这将为您提供所有在Jetty-Base目录中使用当前配置运行Jetty所需的选项和class Pather。

因此,您可以将配置输入 main.java 的Intellij Run配置选项中。但这不建议这样做,如果任何配置在码头底座上发生了变化,则所需的JVM命令行选项也将更改。

也许您应该考虑使用,甚至切换到使用嵌入式码头。

You can generate the full JVM command line used to start jetty with the dry-run command:

java -jar $JETTY_HOME/start.jar --dry-run

This will give you all the options and classpath that is required to run Jetty with your current configuration in your jetty-base directory.

With this you can enter the configuration into your intellij run configurations options for Main.java. But this is not recommended, if any configuration changes in the jetty-base then the JVM command line options required will change as well.

Perhaps you should look into running with remote JVM debug as described in https://github.com/eclipse/jetty.project/issues/8114, or even switching to using embedded Jetty.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文