Error: Module not specified (IntelliJ IDEA)

后端 未结 5 2099
终归单人心
终归单人心 2021-01-31 13:25

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 webs

相关标签:
5条回答
  • 2021-01-31 13:53

    this is how I fix this issue
    1.open my project structure

    2.click module 3.click plus button 4.click import module,and find the module's pom
    5.make sure you select the module you want to import,then next next finish:)

    0 讨论(0)
  • 2021-01-31 13:54

    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)

    Update

    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:

    0 讨论(0)
  • 2021-01-31 13:57

    This happened to me when I started to work with a colleque's project.

    He was using jdk 12.0.2 .

    If you are suspicious jdk difference might be the case (Your IDE complains about SDK, JDK etc.):

    1. Download the appropriate jdk
    2. Move new jdk to the folder of your choice. (I use C:\Program Files\Java)
    3. On Intellij, click to the dropdown on top middle bar. Click Edit Configurations. Change jdk.
    4. File -> Invalidate Caches and Restart.
    0 讨论(0)
  • 2021-01-31 14:03

    For IntelliJ IDEA 2019.3.4 (Ultimate Edition), the following worked for me:

    1. Find the Environment variables for your project.
    2. Specify, from the dropdowns, the values of "Use class path of module:" and "JRE" as in the attached screenshot.

    0 讨论(0)
  • 2021-01-31 14:03

    Faced the same issue. To solve it,

    • I had to download and install the latest version of gradle using the comand line. $ sdk install gradle using the package manager or $ brew install gradle for mac. You might need to first install brew if not yet.
    • Then I cleaned the project and restarted android studio and it worked.
    0 讨论(0)
提交回复
热议问题