A common Java project that connects Webserivice with CXF. Running normally under Eclipse, but using eclipse to reach the jar package, execution at the command line is unusually slow.
Some attempts have been found to be due to the wrong way of packing. There are three ways in which eclipse exports runnable jar packages, namely:
1.Extract required libraries into generated JAR
2.Package required libraries into generated JAR
3.Copy required libraries into a sub-folder next to the generated JAR
In the beginning, the second option was selected, and all the required jar packages were in the generated jar package, which was very slow to run. Then try the first and third and run normally.
Using the Unzip software to view the generated jar package, the first one is to extract the classes from the referenced jar package. The third is to put the referenced jar package in a different folder. Both of these methods work correctly.
may be related to the way in which Java's JAR commands are executed, and it remains to be seen.
Java Engineering hits a jar package at the command line to perform slow-running problem resolution