简体   繁体   English

如何解决netbean javafx应用程序中不存在com.sun.org.apache.xml.internal.security包

[英]How to solve com.sun.org.apache.xml.internal.security package does not exist in netbean javafx application

I want to build .jar in NetBean 8.0.2.我想在 NetBean 8.0.2 中构建 .jar。

I have developed a small project based javafx application.我开发了一个基于 javafx 应用程序的小项目。
My project uses packages such as com.sun.org.apache.xml.internal.security , com.sun.org.apache.xml.internal.security.c14n and com.sun.org.apache.xml.internal.security.utils .我的项目使用诸如com.sun.org.apache.xml.internal.securitycom.sun.org.apache.xml.internal.security.c14ncom.sun.org.apache.xml.internal.security.utils
My project runs well at Netbean without warning or error.我的项目在 Netbean 上运行良好,没有警告或错误。 But When I build this project as jar file, following error is occurred:但是当我将此项目构建为 jar 文件时,出现以下错误:

**error: package com.sun.org.apache.xml.internal.security does not exist**

**error: package com.sun.org.apache.xml.internal.security.c14n does not exist**

**error: package com.sun.org.apache.xml.internal.security.utils does not exist**

How to solve this problem?如何解决这个问题呢?

如果您的项目使用Maven ,请将 Maven 依赖项com.sun.xml.security:xml-security-impl:1.0添加到您的 Maven 项目文件 ( pom.xml )。

您必须将xml-security-impl.jar到您的类路径中。

下载 xmlsec-xyzjar(例如 xmlsec-1.4.0.jar)并将其添加到项目库中,解决了该问题。

You have used a package which should not be used.您使用了不应使用的软件包。 It has already been clarified here on SO and many places that any class within package starting from com.sun must not be used, as they can be removed in later versions of Java, without replacement.已经在 SO 和许多地方澄清了从com.sun开始的包中的任何类都不能使用,因为它们可以在 Java 的更高版本中删除,无需替换。

More information on this : Package com.sun.org.apache.xml.internal.security.utils.Base64 does not exist关于此的更多信息: 包 com.sun.org.apache.xml.internal.security.utils.Base64 不存在

To resolve your problem, you should use some other library.要解决您的问题,您应该使用其他一些库。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 包com.sun.org.apache.xml.internal.security.utils.Base64不存在 - Package com.sun.org.apache.xml.internal.security.utils.Base64 does not exist 符号在模块“java.xml”中声明,它不导出 package“com.sun.org.apache.xpath.internal.operations” - Symbol is declared in module 'java.xml' which does not export package 'com.sun.org.apache.xpath.internal.operations' 如何解决javac编译器错误“包com.sun.tools.internal.ws.processor.model不存在”? - How do I solve javac compiler error, “package com.sun.tools.internal.ws.processor.model does not exist”? 更改com.sun.org.apache.xml.internal.serialize.XMLSerializer&com.sun.org.apache.xml.internal.serialize.OutputFormat - Change the com.sun.org.apache.xml.internal.serialize.XMLSerializer & com.sun.org.apache.xml.internal.serialize.OutputFormat 包com.sun.xml.internal.messaging.saaj.soap.dynamic不存在 - package com.sun.xml.internal.messaging.saaj.soap.dynamic does not exist 包com.sun.xml.internal.bind.v2.model.annotation不存在 - package com.sun.xml.internal.bind.v2.model.annotation does not exist 在 Jenkins 上构建失败:错误:package com.sun.Z0F635D0E0F3874FFF8B581C1.ws.不存在。 - Build on Jenkins fails: error: package com.sun.xml.internal.ws.client does not exist 如何克服此类方法错误:com.sun.org.apache.xml.internal.serialize.OutputFormat - how to overcome SuchMethodError: com.sun.org.apache.xml.internal.serialize.OutputFormat Maven:包com.sun.istack.internal不存在 - Maven: package com.sun.istack.internal does not exist Java 1.7 com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException:无法解析具有ID数据的元素 - Java 1.7 com.sun.org.apache.xml.internal.security.utils.resolver.ResourceResolverException: Cannot resolve element with ID data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM