转自:https://www.cnblogs.com/steven-yang/p/5852988.html

百度的结果表达太奇怪,简单记一笔。

1、下载一个scala的压缩包,https://www.scala-lang.org/download/

2、配置环境变量

3、新建一个文件夹作为工作区。

4、新建.vscode文件夹并保存一份tasks.json文件,内容如下:

{
    "version": "0.1.0",
    "isShellCommand": true,
    "args": [],
    "showOutput": "always",
    "echoCommand": true,
    "suppressTaskName": true,
    "windows": {
        "command": "cmd",
        "args": [
            "/C",
            "scala"
        ]
    },
    "linux": {
        "command": "sh",
        "args": [
            "scala"
        ]
    },
    "osx": {
        "command": "sh",
        "args": [
            "scala"
        ]
    },
    "tasks": [
        {
            "taskName": "run script",
            "isBuildCommand": true,
            "args": [
                "${file}"
            ]
        }
    ]
}

5、打开vs code,选择打开文件夹。

6、新建一个*.scala文件,Ctrl+Shift+B就能跑啦!

最终得到:

vs code上配置Scala

 

相关文章:

  • 2021-05-26
  • 2021-08-21
  • 2021-07-04
  • 2021-12-19
  • 2022-02-02
  • 2022-12-23
  • 2021-06-03
猜你喜欢
  • 2021-04-22
  • 2021-08-14
  • 2022-12-23
  • 2021-04-19
  • 2021-10-22
  • 2021-04-03
相关资源
相似解决方案