错误:未指定模块(IntelliJ IDEA) [英] Error: Module not specified (IntelliJ IDEA)
问题描述
我试图在IntelliJ IDEA中作为静态Web项目执行一个简单的程序.我是新手,正在使用Node.js学习Web开发.我从IntelliJ IDEA的官方网站获得帮助,但错误是相同的.不过,我也配置了设置和项目结构.
I was trying to execute a simple program in IntelliJ IDEA as a static web project. I'm newbie and I'm learning web development with Node.js. I took help from the official website of IntelliJ IDEA, but the error was same. Though, I configured the settings and Project structure also.
错误:
"C:\Program Files\Java\jdk1.8.0_91\bin\java" -Didea.launcher.port=7535 "-Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 2016.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2016.1.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain ""
Exception in thread "main" java.lang.ClassNotFoundException:
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:122)
Process finished with exit code 1
请帮助我解决此问题.几天以来,我一直在研究这个问题.
Please help me to sort out this problem. I'm digging out this problem since few days.
推荐答案
这是因为找不到或不存在作为
forName(String className)
方法的参数传递的className
值,或者您重新传递了错误的值作为类名.这也是可以为您提供帮助的链接.
1.
https://docs.oracle.com/javase/7/docs/api/java/lang/ClassNotFoundException.html
2.
https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#forName(java.lang.String)
This is because the className
value which you are passing as argument for
forName(String className)
method is not found or doesn't exists, or you a re passing the wrong value as the class name. Here is also a link which could help you.
1.
https://docs.oracle.com/javase/7/docs/api/java/lang/ClassNotFoundException.html
2.
https://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#forName(java.lang.String)
更新
Module not specified
根据您提供的快照,此问题是因为您尚未确定项目的应用程序模块,因此建议您从配置中选择应用程序模块.例如:
According to the snapshot you have provided this problem is because you have not determined the app module of your project, so I suggest you to choose the app module from configuration. For example:
这篇关于错误:未指定模块(IntelliJ IDEA)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!