Home >Java >javaTutorial >How to Add a Directory to the Classpath for Application Runtime Configuration in IntelliJ IDEA?
How to Incorporate a Directory into the Classpath for an Application Runtime Configuration in IntelliJ IDEA?
Many developers encounter the need to add a directory to the classpath of an application run profile in IntelliJ IDEA. However, attempting to override this setting using "-cp x:target/classes" in the VM preferences often results in a "java.lang.NoClassDefFoundError: com/intellij/rt/execution/application/AppMain" error.
Solution:
To resolve this issue and successfully add a directory to the classpath for your project in IntelliJ IDEA 13 or later, follow these steps:
By completing these steps, you have successfully incorporated the specified path into the classpath of your project. When running your application, it will now have access to the selected directory.
The above is the detailed content of How to Add a Directory to the Classpath for Application Runtime Configuration in IntelliJ IDEA?. For more information, please follow other related articles on the PHP Chinese website!