0

I'm asking you this question because after a long research on the internet I can't find something helping me to resolve my issue... I just would like you to give me an idea of the problem.

First of all, we have also to consider that :

  • The workspace where I'm working include also 3 other projects that have the same problem.
  • This workspace is synchronized with dropbox
  • I'm using ubuntu, and I created on of them on Windows (dropbox synchronizing everything)
  • All projects worked previously

My problem starts when running my java application on eclipse : "Error: Could not find or load main class Gardener" (Gardener is my main class). I can pre-compile/run this program using the command line, but not on elipse. Therefore, I supposed it was a run configuration problem. I read the documentation, and it seems that my running configuration is ok : the main class is found and selected by the assistant, Java libs are included, and the class path considers these JRE libraries and my project source folder.

Therefore, I supposed it was a problem of build path. But again, everything seems ok, my source folder is seen, Java libs also...

Do you have an idea of something I missed ?

Thanks, Nans

nan0
  • 31
  • 1
  • 1
  • 7
  • 2
    Offtopic: use code repositories instead of Dropbox (e.g. [GIT](http://en.wikipedia.org/wiki/Git_%28software%29)). – m0skit0 Mar 05 '13 at 09:11
  • Can you see the .class file ? Where is it ? Is the containing folder also sync'ed by dropbox ? Is dropbox running all the time ? What do you mean by pre-compile ? – Samuel EUSTACHI Mar 05 '13 at 09:13
  • check the solution here [Error Couldn't find main class][1] [1]: http://stackoverflow.com/questions/11235827/eclipse-error-could-not-find-or-load-main-class – Avinash K.P Mar 05 '13 at 09:15
  • Check this too http://stackoverflow.com/questions/12445625/error-could-not-find-or-load-main-class-in-eclipse – Avinash K.P Mar 05 '13 at 09:23
  • I saw the .class in the folder src and bin, but it was because of my command line building/running (I mean building by pre-compiling). I decided to remove them and build again, but they don't appear again. The solution you gave don't solve the problem because my classpath file seems ok : – nan0 Mar 05 '13 at 09:29
  • I also disabled the folder syncing – nan0 Mar 05 '13 at 09:31

2 Answers2

0

i'm able to simulate this ERROR by removing project from the User Entries under Classpath of Run Configurations.

Please check whether project you are working is visible under User Entries. If not, follow the instructions given here : ManinClassNotFound

Community
  • 1
  • 1
Avinash K.P
  • 167
  • 7
  • It is visible actually. I hoped for a bug, then I removed the project from user entries and add it again, but it didn't change anything. The problem doesn't look to be here. – nan0 Mar 05 '13 at 10:31
  • @nan0 could you please create new workspace and import the project and check again? – Avinash K.P Mar 05 '13 at 11:02
  • I've done it, checking "Workbench Layout", not checking it, and in both cases I still have the same problem. – nan0 Mar 05 '13 at 13:07
  • @nan0 could you please update your post with relevant error messages/screen shots. It will help to analyze further. – Avinash K.P Mar 07 '13 at 10:14
0

Ok, I found the solution to my problem.

My problem was actually related to the name of my project : I used the ':' character. For some reason it was a problem for eclipse. The solution was not only to rename the project, but delete any projects into the workspace, create new projects with working names, and then import file systems into the src directory. After this manipulation, it compiled ! I hope it will help someone.

Nans

nan0
  • 31
  • 1
  • 1
  • 7