How to fix Intellij build failure?

I have a project with several packages and java classes.

Now, if I try to run a class that doesn't contain any errors, another class opens that does. But I don't want to run this faulty class at all.

I can run the class from the console, but I want to run it simply by clicking on the "run" button in the top right corner. How can I fix this error?

1 vote, average: 1.00 out of 1 (1 rating, 1 votes, rated)
You need to be a registered member to rate this.
Loading...
Subscribe
Notify of
3 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
AldoradoXYZ
1 year ago

Hey,

If I understand you correctly, then a mistake occurs when you compile your project, that happens when you click on "run".

It doesn't matter whether the compiled class is actually used for runtime or not. It is only important that it is compiled and that the error occurs.

You can avoid this by excluding the class from the build, or just temporarily extinguishes, or expel (classic move).

Here you can find your explanation how to exclude classes/losses from the build: https://www.jetbrains.com/help/idea/specifying-compilation-settings.html

Greeting

AldoradoXYZ
1 year ago
Reply to  Dasistdoof1345

Unfortunately, it won't be much easier.