Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)

时间:2022-04-27 23:12:17

随着Apache Spark,scala也成了必学的语言,下面讲一下Eclipse搭建scala开发环境。

网上有很多的教程,但是给的scala的地址下载的插件无法开发scala,会出现“JDT weaving is currently disabled”的问题,这是由于使用了错误的Scala地址


Java: jre1.8.0_40

Eclipse: 4.4.1

http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/1/eclipse-java-mars-1-win32-x86_64.zip

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)

Help-->Install New Software

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)


Scala地址网上有很多,安装完成以后都有错误,在stackflow上找到了一个可用的地址

http://download.scala-ide.org/sdk/lithium/e44/scala211/dev/site/

在Add中输入改地址

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)


将search出的所有资源勾选中

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)

然后一路Next-->Finish,下载安装完成后Eclipse重启。在File-->New-->Scala Project,然后新建一个Scala Object,运行以下代码

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)

package com.scala

object Test {
def main(args: Array[String]): Unit={
println("hello scala!");
}
}


 

Console台输出结果:

Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)Eclipse搭建scala环境(解决“JDT weaving is currently disabled”问题)hello scala!


至此,环境搭建完成