3

So I have 3 modules that are dependent (use each others classes). In IntelliJ i have included the module dependencies and everything was working fine for a while, until maybe I pressed one of the short keys. What I know the problem is, now if I try to ctrl+click on one of the variables in module A that belong to module B, it asks me if it's ok to use Decompiler (I accidentally pressed yes). So it gave me .class --> so I was able to indicate that this .class has a source folder. Now that you click on module B variable from module A it takes you to .java class at its supposed to. However ...

Now when I add new variable to module B, I can't call it from module A because that module doesn't see it? But it sees the original variables from module B. I was wondering if someone had this problem before

Btw. I default restarted IntelliJ from my laptop (yes removing all caches), however I come back to this problem. I wonder if the root cause is in my settings.xml or pom file

2 Answers2

-1

Go to Project Structure (Ctrl + Alt + Shift + S) and select Modules.

Make sure that the other modules containg the java files you want are correctly added to the Sources Folders.

UserF40
  • 3,533
  • 2
  • 23
  • 34
-1

Project --> src [right click] -->new ---> java class

Should make a Java file and then you could move all your contents into that file.