It was surprise for me when I ran the jar file I got class not found exception , in case if you are facing the problem in scala IDE, then this post might help.
ok, How to check your compiled class is part or not
$ jar tf <jar file>
this lists items resides in the jar file
in case your class is missing, then probably you need to plugin in pom.xml
ok, How to check your compiled class is part or not
$ jar tf <jar file>
this lists items resides in the jar file
in case your class is missing, then probably you need to plugin in pom.xml
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
Thats all, build your jar file again
and run the above command
No comments:
Post a Comment