I have some jar files in / libs / and my project classes are located in / target /. To remove the dependency on an external folder. I want to create a consolidated jar file. Which contains all the classes from the jar files found in all / libs / *. Jar
I am using the following Ant script:
<jar destfile="mytest.jar" basedir="target/classes"> <manifest> <attribute name="Main-Class" value="com.mytest.MyProcessor"/> </manifest> <fileset dir="target/classes" includes="**/*.class"/> <zipgroupfileset dir="libs" includes="*.jar"/> </jar>
But when I start the jar using the command "java -jar mytest.jar", it says:
An exception in the "main" thread java.lang.SecurityException: there is no explicit section for writing the javax / mail / internet / ContentDisposition.class signature file at sun.security.util.SignatureFileVerifier.verifySection (Unknown source) at sun.security.util.SignatureFileVerifier .processImpl (Unknown source)
Any idea how to make a consolidated bank that does not have such problems will be highly appreciated. I am using IntelliJ IDEA.
source share