开发者

How to configure Maven-exec plugin with java classpath

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜