i am trying to run the maven-exec plugin with referring the jar file as classpath like this
<configuration>
<executable>java</executable>
<longClasspath>true开发者_C百科</longClasspath>
<commandlineArgs>-classpath jarfile; Sample
</commandlineArgs>
</configuration>
but my classpath is not set properly thus thrown an classNotFoundException. How to configure this?
Your classpath shouldn't end with a semicolon. Just -classpath jarfile Sample
, assuming that "Sample" is the name of the class you're trying to run. I'd also eliminate the newline at the end of that command line string to be safe.
精彩评论