I\'m attempting to compile Java 1.4 code that was created by IBM\'s WSDL2Java on Java5 without recreating
In the case you are sure that you should be able to access given class, than this can mean you added several jars to your project containing classes with identical names (or paths) but different content and they are overshadowing each other (typically an old custom build jar contains built-in older version of a 3rd party library).
For example when you add a jar implementing:
a.b.c.d1
a.b.c.d2
but also an older version implementing only:
a.b.c.d1
(d2 is missing altogether or has restricted access)
Everything works fine in the code editor but fails during the compilation if the "old" library overshadows the new one - d2 suddenly turns out "missing or inaccessible" even when it is there.
The solution is a to check the order of compile-time libraries and make sure that the one with correct implementation goes first.