JavaFX中的Jetty和/或Servlet-api中断了部署 [英] Jetty and/or Servlet-api in JavaFX breaks deployment

查看:318
本文介绍了JavaFX中的Jetty和/或Servlet-api中断了部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将Jetty 嵌入(使用)我的JavaFX 2.2小程序(在浏览器中运行).

I try to embed (use) Jetty into my JavaFX 2.2 applet (which runs in a browser).

我的问题是,要托管servlet,除了jetty-server.jar,jetty-servlet.jar和jetty-util.jar外,还需要包括servlet-api-3.0.jar(对于javax.servlet命名空间).

My problem is that, to host servlets I need to include the servlet-api-3.0.jar also (for javax.servlet namespaces) besides jetty-server.jar, jetty-servlet.jar and jetty-util.jar.

如果我包含servlet-api.jar,则我的项目会编译,但是当我在浏览器中运行它时,部署失败,由于系统配置JavaFX应用程序无法启动(显示错误详细信息).请参阅java. com/javafx获取故障排除信息."错误消息.

If I include the servlet-api.jar, my project compiles, but when I run it inside the browser, the deployment fails with the "JavaFX application could not launch due to system configuration (show error details). See java.com/javafx for troubleshooting information." error message.

如果我删除servlet-api.jar(并删除相关源代码),它将再次部署.

If I remove the servlet-api.jar (and remove the relevant source) it deploys again.

对于JavaFX项目,Java平台设置为默认JavaFX平台",最好保持这种方式以减少所需的最小占用空间.

For the JavaFX project the Java Platform is set to "Default JavaFX Platform", and it would be good to keep it this way to reduce the minimum footprint required.

我不是java(fx)专家(我来自.NET世界),所以我将不胜感激!

I'm not a java(fx) expert (I come from .NET world), so I'd appreciate any help!

推荐答案

您在签名JAR时遇到问题.我对JavaFX的JAR签名不是很熟悉,但是这里是文档:

You have an issue with signing the JARs. I'm not very familiar with signing JARs for JavaFX but here is the documentation:

http://docs.oracle.com/javafx/2/Deployment/packaging.htm#BABJGFBH

http://docs.oracle.com/javafx/2/部署/javafx_ant_task_reference001.htm#CIAFJGAB

这篇关于JavaFX中的Jetty和/或Servlet-api中断了部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆