running scala apps with java -jar

If you define -jar the -classpath is ignored:

Java manual:

-jar When you use this option, the JAR file is the source of all user
classes, and other user class path
settings are ignored.

You can define the classpath dependencies in the Manifest metadata.

The easiest way to start your app is using the scala scripts:

scala -classpath target/scaaaaaaaaala-1.0.jar scaaalaaa.App Hello World!

Leave a Comment