views:

165

answers:

2

Hello. I'm having problem compiling a project in Eclipse.

The import com.sun.javadoc cannot be resolved

I added tools.jar as an external jar, changed default compiler to use jdk instead of jre, did Project -> Clean afterwards. But nothing of this helped. What am I missing here?

UPD: this is how it looks like (packages exist on the left, but not seen on the right): alt text

+1  A: 

There's a typo. If you're attempting to run javadoc programmatically, you need to use

com.sun.tools.javadoc.Main

and not

com.sun.javadoc.Main.

Vineet Reynolds
I added a screenshot. Also, it's actually not my code, It's from an android platform sources. I also succeeded in building this code from the console, so the problem has to be somewhere in eclipse.
folone
Ah Android, I believe its got something to do with the paths involved, as quite a few people have experienced the same - https://groups.google.com/group/android-platform/browse_thread/thread/ee575553996a1c8b/f2eb29f955b1f523 ; you can try setting the ANDROID_JAVA_HOME variable, like discussed and verify if that works.
Vineet Reynolds
Btw, I'm behind a very restricted proxy, so apologies for not making anything out of the picture.
Vineet Reynolds
Yes, the problem was with android. Copied `/development/ide/eclipse/.classpath` to the root, and it resolved this. Thank you.
folone