I have a real head here. I tried everything, searched everywhere. This comes from an application that I have inherited from test JARs.
(It consists of a GUI and a command line application that does the actual verification. The GUI launches the command line application by launching a new JVM on itself [java -cp "yourself.jar" com.different. MainClass]. This is a bad design, I know but may be relevant.)
In any case, this program contains some reflection calls nested inside two for-loops. The problem is that when the application is JARed up, the first reflection call takes exactly one second at each iteration. But when it starts from classes, it takes a few milliseconds.
In practice, this means the following command:
java -jar myjar.jar
takes hours.
This command:
java -cp "...[bunch of jars];myjar.jar" com.myclasses.main
takes minutes.
A verified JAR is always a bank. The difference is only in the test application.
Any ideas or opportunities to pursue are greatly appreciated. Thanks!
Michael steinberg
source share