Run scala *.jar file from Ubuntu terminal

Al Jenssen

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?

Reid Spencer

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Running a jar file from terminal in ubuntu

From Dev

Cannot run jar file created from Scala file

From Dev

Cannot run jar file created from Scala file

From Dev

run jar in debug mode from terminal

From Dev

file not run from browser but run from terminal

From Dev

Running jar file from terminal on linux

From Dev

Run jar file as Daemon on Linux Ubuntu

From Dev

Run FORTRAN *.exe from Ubuntu terminal

From Dev

Run pip from Ubuntu terminal on Windows

From Dev

Run a jar file from a java file

From Dev

How do I run a .JAR file via the terminal

From Dev

Errors happen when I run the jar file in terminal

From Dev

Run sql file in database from terminal

From Dev

Unable to run python file from terminal

From Dev

How to run a js file from windows terminal?

From Dev

Run sql file in database from terminal

From Dev

How to make a jar file from scala

From Dev

read a scala conf file from a maven jar

From Dev

How to run commands from a bash file the way they run from terminal?

From Dev

Can't open .jar file from ubuntu

From Dev

can't run .scala file from REPL?

From Dev

How can I execute a .jar file from the terminal

From Dev

How can I execute a .jar file from the terminal

From Dev

How do I simply run an ubuntu touch app from the terminal?

From Dev

how to build simple program run from terminal in ubuntu

From Dev

Ubuntu: Looking for simple way to run an application from the terminal

From Dev

Search for latest version of jar file in folder and run it from batch file

From Dev

How to run PyCharm in Ubuntu - "Run in Terminal" or "Run"?

From Dev

How to run a PHP file from ubuntu?