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