hi all
i have a target app written in Java.
i want to call one of its functions.
im using Intellij Idea.
i imported its dependencies.
wrote a few lines of code and till now, i have two problems.
1. i get:
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
and i fix this problem manually by removing 'META-INF/*.RSA' 'META-INF/*.DSA' files within the jar.
i want to know why this problem rises and how can i fix it in the proper way.
2. i don't know how to handle dependencies. for example when i want to call log4j, i get the "NoClassDefFoundError" exception.
i solved by adding log4j classes into the compiled jar file and it fixed.
clearly dependencies are not found. i tries -cp to no avail.
What I have tried:
googling:
i found some ant/gradle scripts but i don't know where to put them.
for now just manually modifying the compiler jar file for it to work.