idea cannot stop after starting main method and outputting hello word

Answered

Why does slf4j log output after starting main method

0
3 comments

Hi there,

The error message says that there is a dependency on an slf4j class somewhere in the project that is not being provided at runtime.

How was the project created? Through the IDE wizard or manually? 

Is Maven or Gradle used as a build system?

With Maven, for instance, you could try adding the following dependencies to pom.xml and reloading the project from the Maven tool window:

<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-api</artifactId>
    <version>2.20.0</version>
</dependency>
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.20.0</version>
</dependency>
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-slf4j-impl</artifactId>
    <version>2.20.0</version>
</dependency>
0

This project is not maven nor gradle, but a different java project, casually built a main method, this should be the problem of the idea version, in the latest version will be like this, the old version is no problem

0

Solutions to try:

  • Temporarily disable ALL non-bundled plugins and restart the IDE: File | Settings | Plugins | ⚙ | Disable all downloaded plugins
  • Temporarily reset IDE settings to defaults (a backup copy will be created in the process): File | Manage IDE Settings | Restore Default Settings

If it doesn't help, please provide a test project where this can be reproduced for you. You can share it on Github or upload to our server at https://uploads.jetbrains.com (make sure to share the ID of the upload here so that I can find it).

0

Please sign in to leave a comment.