running scala apps with java -jar

后端 未结 5 1976
日久生厌
日久生厌 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:29

    Below is the way to execute the Scala Executable Jar

    • We need scala installed in your system.

    • Here first will give the jar path and jar name

    • If your code needs any dependency jar then keep all jar in one directory and give a path of this in command like below after the ":".

    • At last give your class/object name.

    scala -cp "/your/jar/path/jar_name.jar:/your/dependency/jar/path/*" SampleCode

提交回复
热议问题