How do I run a scala script from the Terminal

Zen
New Contributor III

Hello,

how do I run a scala script from a Terminal on Databricks - Web Terminal, or from a cell with %sh

just doing `scala -nc script.scala` is not working.

Thanks,

Zen
New Contributor III

thank you @Kaniz Fatma​  - unfortunately, I haven't gotten a response for this - it'd help me greatly if you could help with this question, thanks

Zen
New Contributor III

thank you @Kaniz Fatma​  , some additional info about this. I tried the suggestions here:

https://forums.databricks.com/questions/63537/how-do-you-start-a-spark-shell-on-the-cluster-mast.htm...

but got the same errors as in the link

Zen
New Contributor III

Hi @Kaniz Fatma​  - I'm following up to check if you were able to find any information on my question. I'd greatly appreciate your help - thank you,

User16753724663
Databricks Employee
Databricks Employee

Hi @Zen​ 

the web terminal is basically used for shell commands only and specific to driver node only.

You can install the scala on top of the driver node from web terminal with below command and use it:

% sudo apt install scala

Please let me know if this helps.

Regards,

Darshan

View solution in original post