Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Finding java.lang.String
Finding java.lang.String [message #254088] Thu, 19 June 2008 12:48 Go to next message
Paul Glezen is currently offline Paul GlezenFriend
Messages: 60
Registered: July 2009
Member
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 14:39 Go to previous message
Jerome Lanneluc is currently offline Jerome LannelucFriend
Messages: 572
Registered: July 2009
Senior Member
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: Wed Jul 17 12:51:40 GMT 2024

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

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

Back to the top