I have a compiled *.jar
file, which is actually Scala code. I want to run this application from a terminal with increased JVM memory. The way I run it so far is:
scala MyApp.jar
The above works, the app is running.
and this:
scala -Dname=Xmx2g MyApp.jar or scala -Dname=-Xmx2g MyApp.jar
I do this to use more JVM memory, the app is actually running, but does not seem to use more memory.
How can I run a Scala application (*.jar
file) with increased JVM memory?
The scala
command requires use of the -J
option in order to pass options on to the JVM. So, the command line you probably want is: scala -J-Xmx2g MyApp.jar
FYI, the -Dname=Xmx2g
would define a system property named name
and give it the value Xmx2g
, probably not what you want.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments