Help
Help

Reputation: 27

IntelliJ Running other class files, how do I stop this?

Why this other class file is running instead of the one I clicked on please help. My Process is included in the gif, I can't tell why this is occurring.

Upvotes: 0

Views: 7663

Answers (5)

Jay Umap
Jay Umap

Reputation: 1

It compiles all the class files and throws error in the particular even though you change the run configurations. I was able to run the required by just eliminating the errors in the other files that's it. Otherwise whichever file is causing the error just exclude it from compiling and then try.

Upvotes: 0

Patrick Lau
Patrick Lau

Reputation: 11

I had a similar problem. Don't click on the run button. Right click on the class you want to run and click run.

Upvotes: 1

weston
weston

Reputation: 54781

It's not running it, it's compiling it and the whole application must compile before you can run tests. You must fix the errors to continue.

Don't ignore the errors. They tell you the exact problem. Method CostPanel has no return type. But I think you copied and renamed a class without renaming its constructor.

Upvotes: 0

JUAN CALVOPINA M
JUAN CALVOPINA M

Reputation: 3955

This usually happens because before running the test class, the IDE needs to build the project, it found a class that has error and can not complete the test. You can try to fix the ButtonPanel.java class and try to run the test again

Upvotes: 1

Related Questions