running scala apps with java -jar

后端 未结 5 2006
日久生厌
日久生厌 2020-12-09 02:02

I got some problems with the java. Check it out.

sebastian@sebastian-desktop:~/scaaaaaaaaala$ java -cp /home/sebastian/.m2/repository/org/scala-lang/scala-libr

5条回答
  •  情话喂你
    2020-12-09 02:26

    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!
    

提交回复
热议问题