Sunday, 15 September 2013

Eclipse error with archived java projects "editor does not contain main type" -



Eclipse error with archived java projects "editor does not contain main type" -

this question has reply here:

error: selection not contain main type 12 answers

i receiving errors: editor not contain main type, or, selection not contain main type when import archived java project eclipse , seek run it. have gotten error on several different operating systems.

archive protocol

export project general->archive file all selected: project folder, .classpath , .project [x] save in zip format [x] create directory construction files [x] compress contents of file

a work around may explain it... but how?!

i notice when import archived project existing project (a blank java project), folder hierarchy like:

project src bin imported_project bin src actual_code.java

now, when seek run actual_code.java, above error. discovered next work around: if drag actual_code.java , drop project->src and then run it, works.

this nice work around. however, prefer able run imported project without moving things around. any suggestions on how this? seems should be trivial fix--it seems project isn't importing ought to.

and yes...

i have tried every method have come across remedy this. includes quite few site , others: syntax, libraries, source path, restart eclipse, rearchive, different operating systems, different machines... etc.

the .java files in src folder before archive them, , build path seems correct.

you import archive project instead of files newly created blank project. utilize import > existing projects workspace. then, utilize select archive file.

java eclipse

No comments:

Post a Comment