Run scala * .jar file from Ubuntu terminal

I have a compiled file *.jar, which is actually Scala code. I want to run this application from a terminal with increased JVM memory. So far I am running it:

scala MyApp.jar 

The above works, the application works.

and this:

scala -Dname=Xmx2g MyApp.jar or scala -Dname=-Xmx2g MyApp.jar

I use more JVM memory, the application really works, but doesn't seem to use more memory.

How can I run a Scala ( *.jar) application with increased JVM memory?

+4
source share
1 answer

The command scalarequires the use of an option -Jto pass JVM parameters. So you probably want to: scala -J-Xmx2g MyApp.jar

FYI, -Dname=Xmx2g name Xmx2g, , , .

+1

All Articles