I have extracted a jar file from an eclipse project but it runs too slow. It takes almost twenty minutes to complete and the eclipse project only takes some seconds. I exported runnable jar with library handling with all three differenct choices. I also exported jar file with all library handling choices. I also run jar file with command:
java -Xmx2048m -Xms1024m -jar "finalJar.jar"
I have removed all System.out.println except the last one that gives me the answer. What can I do to export a jar that is almost fast as the original project? Or run it with a different way to be faster? Because the difference in time is too big and I don't understand why.
Using the option "Extract required libraries into generated file" helped me a lot, it's faster now.
The option "Package required libraries into generated JAR" copy the libs you use as jar files into your own jar file and the JVM needs to open it (or even extract if it's compacted) when you run the application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With