Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Finding java.lang.String
Finding java.lang.String [message #254088] Thu, 19 June 2008 08:48 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Modify the grammar of java
Next Topic:renaming behavior is strange for classes
Goto Forum:
  


Current Time: Thu May 01 16:04:37 EDT 2025

Powered by FUDForum. Page generated in 0.03426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top