Finding java.lang.String [message #254088] |
Thu, 19 June 2008 08:48  |
Eclipse User |
|
|
|
Hi Folks,
I'm failing to resolve java.lang.String as an IType using the
IJavaProject.findType(String)
method. When I pass in "java.lang.String", the result is null. I have
the same problem with other standard JDK types, but not with
user-defined types on the project's classpath. Is this working as
designed? The javadoc claims it will locate any type on the project's
class path. Are the JDK's runtime JARs not considered part of the
project's classpath?
Thanks,
- Paul
|
|
|
Re: Finding java.lang.String [message #254093 is a reply to message #254088] |
Thu, 19 June 2008 10:39  |
Eclipse User |
|
|
|
Paul Glezen wrote:
> Hi Folks,
>
> I'm failing to resolve java.lang.String as an IType using the
>
> IJavaProject.findType(String)
>
> method. When I pass in "java.lang.String", the result is null. I have
> the same problem with other standard JDK types, but not with
> user-defined types on the project's classpath. Is this working as
> designed? The javadoc claims it will locate any type on the project's
> class path. Are the JDK's runtime JARs not considered part of the
> project's classpath?
>
> Thanks,
> - Paul
Paul,
What does IJavaProject.gerResolvedClasspath(true) return?
Is rt.jar included in the resulting classpath?
If not, then it looks like the project's classpath was not correctly
set up and it will not find "java.lang.String".
Jerome
|
|
|
Powered by
FUDForum. Page generated in 0.05907 seconds