Using JBuilder to reference jar files made by external jar packs, run-time problems

Source: Internet
Author: User

I did a project, from the external application of a lot of jar package, with the JBuilder 2006 Run-time Normal, but after making the jar file, run Java-jar Xxx.jar command will report the following error:

Exception in thread ' main ' java.lang.SecurityException:no manifiest section for
Signature file Entry Com/sun/java/help/impl/tagproperties.class
At Sun.security.util.SignatureFileVerifier.verifySection (signaturefileve
rifier.java:377)
At Sun.security.util.SignatureFileVerifier.processImpl (signaturefileveri
fier.java:231)
At Sun.security.util.SignatureFileVerifier.process (signaturefileverifier
. java:176)
At Java.util.jar.JarVerifier.processEntry (jarverifier.java:234)
At Java.util.jar.JarVerifier.update (jarverifier.java:188)
At Java.util.jar.JarFile.initializeVerifier (jarfile.java:321)
At Java.util.jar.JarFile.getInputStream (jarfile.java:386)
At Sun.misc.JarIndex.getJarIndex (jarindex.java:99)
At Sun.misc.urlclasspath$jarloader$1.run (urlclasspath.java:606)
At Java.security.AccessController.doPrivileged (Native method)
At Sun.misc.urlclasspath$jarloader.ensureopen (urlclasspath.java:597)
At Sun.misc.urlclasspath$jarloader.<init> (urlclasspath.java:581)
At Sun.misc.urlclasspath$3.run (urlclasspath.java:331)
At Java.security.AccessController.doPrivileged (Native method)
At Sun.misc.URLClassPath.getLoader (urlclasspath.java:320)
At Sun.misc.URLClassPath.getLoader (urlclasspath.java:297)
At Sun.misc.URLClassPath.getResource (urlclasspath.java:167)
At Java.net.urlclassloader$1.run (urlclassloader.java:192)
At Java.security.AccessController.doPrivileged (Native method)
At Java.net.URLClassLoader.findClass (urlclassloader.java:188)
At Java.lang.ClassLoader.loadClass (classloader.java:306)
At Sun.misc.launcher$appclassloader.loadclass (launcher.java:276)
At Java.lang.ClassLoader.loadClass (classloader.java:251)
At Java.lang.ClassLoader.loadClassInternal (classloader.java:319)

Later search on the internet, found that many use JBuilder from the external reference jar package in the production of jar files have this problem. Presumably the reason for this is that the external jar package has a signature, and the new jar file cannot be validated after it is created, which seems to be a jbuilder problem (indeterminate).

There are some solutions on the web, such as putting the jar package to be imported into the JBuilder JDK Library and having the JBuilder rescan again, but I didn't succeed in this way, Estimate is MAINFEST.MF file inside the path problem, always hint to find import things, I tried several times did not solve.

Another approach is to not choose to generate mainfest files when JBuilder makes the settings for the jar file, which I did not succeed.

Finally a desperate fight, the front is not mainfest.mf file path is not right, then I still import the jar package from the outside, still generate mainfest files. Build good later with WinRAR open, found Meta-inf There are many files folder, I do not know what to do with, simply in addition to MAINFEST.MF other files folder are deleted. After the deletion of the implementation of Java-jar Xxx.jar command, incredibly successful. It is estimated that the deletion of the files may be validated, but the JBuilder generation is incomplete, so the validation, but not successful. Now you don't have to verify it, and the jar bag becomes a. class file and I write the program at the same level, so MAINFEST.MF file without modifying the path can also be directly found

The internet seems to be more than just Jbuilder2006 have this problem, from 9 onwards I see a lot of people have raised this question

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.