Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

I have developed a small project based javafx application.
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.
My project runs well at Netbean without warning or error. But When I build this project as jar file, following error is occurred:

**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?

like image 459
Lin RenHua Avatar asked Jun 18 '15 08:06

Lin RenHua


2 Answers

If your project uses Maven, add Maven dependency com.sun.xml.security:xml-security-impl:1.0 to your Maven project file (pom.xml).

like image 152
Derek Mahar Avatar answered Nov 08 '22 15:11

Derek Mahar


You have to add the xml-security-impl.jar to your classpath.

like image 25
Jens Avatar answered Nov 08 '22 15:11

Jens