Can't load or find the main class in java eclipse

35 Views Asked by At

So I was doing a JDBC connectivity program I made a new project on eclipse and created a class then I installed the connectivity driver and uploaded the path into the modulepath then after writing the code and running it, it shows the error like "Could not find or load main class JDBCExample in module MyProject"

I tried to upload the path of the jar file into classpath from the modulepath but still the output error remain the same..

1

There are 1 best solutions below

0
Swapnil On

There are few points that you can surely check before running:

  1. Check if the project's build path is configured and the required libraries are present.
  2. Check the Installed JRE in the eclipse preferences
  3. Create/Edit a Run configuration and check if the classpath is set correctly