IDEA 14.1.3-import之前的scala项目报错:Exception in thread "main" java.lang.ClassNotFoundException: kmust.hj

Run 的时候

D:\Develop\JDK\jdk-7u79-windows-i586\bin\java -Didea.launcher.port=7532 "-Didea.launcher.bin.path=D:\Develop\Scala\IntelliJ IDEA Community Edition 14.1.3\bin" -Dfile.encoding=GBK -classpath "D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\charsets.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\deploy.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\javaws.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jce.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jfr.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jfxrt.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jsse.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\management-agent.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\plugin.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\resources.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\rt.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\access-bridge.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\dnsns.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\jaccess.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\localedata.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunec.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunjce_provider.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunmscapi.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunpkcs11.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\zipfs.jar;D:\Develop\Scala\IntelliJ IDEA Projects\scalaProjects\out\production\scalaProjects;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-actors-2.11.0.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-actors-migration_2.11-1.1.0.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-library.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-parser-combinators_2.11-1.0.4.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-reflect.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-swing_2.11-1.0.2.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-xml_2.11-1.0.4.jar;D:\Develop\Scala\IntelliJ IDEA Community Edition 14.1.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain kmust.hjr.learningScala01.scalaMain
Exception in thread "main" java.lang.ClassNotFoundException: kmust.hjr.learningScala01.scalaMain
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:191)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)

Process finished with exit code 1

Debug 的时候

D:\Develop\JDK\jdk-7u79-windows-i586\bin\java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:9932,suspend=y,server=n -Dfile.encoding=GBK -classpath "D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\charsets.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\deploy.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\javaws.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jce.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jfr.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jfxrt.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\jsse.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\management-agent.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\plugin.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\resources.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\rt.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\access-bridge.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\dnsns.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\jaccess.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\localedata.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunec.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunjce_provider.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunmscapi.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\sunpkcs11.jar;D:\Develop\JDK\jdk-7u79-windows-i586\jre\lib\ext\zipfs.jar;D:\Develop\Scala\IntelliJ IDEA Projects\scalaProjects\out\production\scalaProjects;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-actors-2.11.0.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-actors-migration_2.11-1.1.0.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-library.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-parser-combinators_2.11-1.0.4.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-reflect.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-swing_2.11-1.0.2.jar;D:\Develop\Scala\Scala Programming Language Distribution\lib\scala-xml_2.11-1.0.4.jar;D:\Develop\Scala\IntelliJ IDEA Community Edition 14.1.3\lib\idea_rt.jar" kmust.hjr.learningScala01.scalaMain
Connected to the target VM, address: '127.0.0.1:9932', transport: 'socket'
错误: 找不到或无法加载主类 kmust.hjr.learningScala01.scalaMain
Disconnected from the target VM, address: '127.0.0.1:9932', transport: 'socket'

Process finished with exit code 1

解决方法

自己也是醉了,实在找不来了!把整个项目删除了!

重新添加了一次,在通过Project Structure里面的SDKs和

Global Libraries设置所需要的jdk和库,结果好了!

这里写图片描述

另:查看某个端口被谁占用

http://jingyan.baidu.com/article/3c48dd34491d47e10be358b8.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

易悠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值