vs code上配置Scala

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

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

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

二、配置环境变量windows

三、新建一个文件夹做为工做区。ui

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

{ "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}" ] } ] }

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

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

最终获得:htm

相关文章
相关标签/搜索