#.JAR files are said to not exist
1 messages · Page 1 of 1 (latest)
<@&987246527741304832> please have a look, thanks.
Here is an AI assisted attempt to answer your question 🤖. Maybe it helps! In any case, a human is on the way 👍. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
The issue you’re facing is likely because adding .JARs in IntelliJ’s editor (for code completion) does not automatically include them in the runtime classpath. This causes the “.JAR files not found” error when you run the program.
Key points to check in your old code setup:
-
Module dependencies: Make sure your .JAR files are added as dependencies in File > Project Structure > Modules > Dependencies. This links them to both compile-time and run-time.
-
Run Configuration classpath: Verify your Run/Debug Configuration includes these dependencies in the classpath. Sometimes, the IDE uses a different classpath for execution.
-
Build tool integration: If using Maven/Gradle, adding jars manually won’t work as expected — the build tool manages dependencies and runtime classpath.
Your old code references likely showed adding jars via Project Structure > Libraries and ensuring modules depend on those libraries correctly, which IntelliJ then bundles during run.
Summary: The editor’s code completion works because jars are on the compile-time classpath, but the runtime classpath is missing those jars. Adjusting the module dependencies or run configuration should fix your problem.
Useful links: