错误:未指定模块。 IntelliJ IDEA Ultimate [英] Error: Module not specified. IntelliJ IDEA Ultimate
问题描述
我试图在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.
推荐答案
这是因为 className
您作为参数传递的值
forName(String 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
根据您提供的快照,此问题是因为你还没有确定项目的app模块,所以我建议你从配置中选择app模块。例如:
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:
< img src =https://i.stack.imgur.com/I3Zg1.pngalt =在此处输入图像说明>
这篇关于错误:未指定模块。 IntelliJ IDEA Ultimate的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!