Output path

Answered

For a project name XXX, under directory XXXHome, the compiler generates output paths:

/projects/XXX/output/production/XXX/com/...

/projects/XXX/output/test/XXX/com/...

And the debugger or the IDE can't find the class files. The project's output path is defined as:

/projects/XXX/output/

The error message is: Error: Could not find or load main class test.com.aaswdev.sw.xxx.XxxUT

(The unit test class I am trying to run is: com.aaswdev.sw.xxx.XxxUT)

I don't know why the IDE adds a "/XXX" directory under production and test, but I guess that is the reason why it can't find find the class files.

????

5 comments
Comment actions Permalink

Please share the sample project to reproduce it. There is some misconfiguration.

The directory added to production and test is the module name so that you can build multiple modules and their output doesn't clash.

In the module settings it's possible to override the output folder, but your issue seems to be elsewhere.

0
Comment actions Permalink

How can I share the project? Its on my machine.

0
Comment actions Permalink

Prepare a reproducible test case project, zip the project folder and upload it to our server: https://intellij-support.jetbrains.com/hc/articles/206869619. Provide the file name here.

0
Comment actions Permalink

Problem solved. I found that my test source branch did not have a "src" directory under "test", I defined .../test as the test source root, and apparently intelliJ requires a "src" directory as a root (is intelligent then? :)

However, earlier today, the building lost internet access for a few hours, and at that time the IDE was terribly slow, especially compiling and running, got stuck in "performing tasks after compilation" for long times. When Internet access resumed, things went back to normal. This is not good, the IDE tool should work off line as well. FYI.

0

Please sign in to leave a comment.