[nbj2ee] JNA 3.4.0 and Netbeans IDE 7.2 signature problem

  • From: "jevad" < >
  • To:
  • Subject: [nbj2ee] JNA 3.4.0 and Netbeans IDE 7.2 signature problem
  • Date: Thu, 25 Oct 2012 04:53:58 -0400

I downloaded 
http://bits.netbeans.org/7.2/jnlp/org-netbeans-libs-jna/ext-jna-3.4.0.jar and ;
added it to my Ant library manager in NetBeans IDE 7.2 (Build 201207171143)

and edited my build.xml with 

Code:

<target name="-pre-jar">
    <unjar src="${file.reference.ext-jna-3.4.0.jar}" 
dest="${build.classes.dir}"/>
    </target>



and edited \nbproject\private\private.properties

Code:

file.reference.ext-jna-3.4.0.jar=C:\\Downloads\\ext-jna-3.4.0.jar




If I run the jar file after clean and build project

I get this error


Code:

Exception in thread "main" java.lang.SecurityException: Invalid signature 
file digest for Manifest main attributes
        at 
sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:221)
        at 
sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:176)
        at java.util.jar.JarVerifier.processEntry(JarVerifier.java:245)
        at java.util.jar.JarVerifier.update(JarVerifier.java:199)
        at java.util.jar.JarFile.initializeVerifier(JarFile.java:323)
        at java.util.jar.JarFile.getInputStream(JarFile.java:388)
        at 
sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:692)
        at sun.misc.Resource.cachedInputStream(Resource.java:61)
        at sun.misc.Resource.getByteBuffer(Resource.java:144)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:256)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)




I guess it have something to do with that it unjar the JNA and then the 
signature gets messed up somehow.
All works if I run it from netbeans but as soon as I try to make onejar file 
of it I can't run it at all. 
I am new to java and netbeans this is probably just a newbie mistake from my 
side :)






[nbj2ee] JNA 3.4.0 and Netbeans IDE 7.2 signature problem

jevad 10/25/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close