Is there a way to execute a scala script from Eclipse with scala plugin?
A scala script is a scala file which is executed line by line, without forcing you to write a main method. See the Description
section in scala's man page.
Is there a way to execute a scala script from Eclipse with scala plugin? A scala script is a scala file which is executed line by line, without forcing you to write a main method. See the
|
|||||
|
If you have the scala distribution installed on the same machine, you can configure the "External Tools" to run scala scripts.
Now, if you highlight a scala script file, you can run it from the toolbar. Note that this is independent of the scala eclipse plugin, and in fact, you may have to name your scripts a different extension (.scalascript?) if you have it installed. |
|||
|
You can open an interactive shell by right-clicking on the project, selecting Scala-> Create interpreter in XYZ. |
|||
|
If I recall correctly, the Scala Eclipse plugin comes with an interactive console in which you can execute your Scala script. Detail of how to activate it has escaped me since I haven't been using Eclipse for Scala development for a long time. Look it up, its there. |
|||
|
Don't know about running a script from Eclipse, but you can do something like this:
|
|||||
|