Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Can't link to dependent class(Class name cannot be resolved to a type)
Can't link to dependent class [message #1763335] Fri, 12 May 2017 18:49 Go to next message
Paul Marlin is currently offline Paul MarlinFriend
Messages: 2
Registered: May 2017
Junior Member
index.php/fa/29335/0/Sorry, newbie here.

I have a project called boilerplate and a package called boilerplate that contains a java class called kbInput. kbInput contains a static method called get().

Also I have a project called testApp with a java class called testKB containing a static class called main. Included it it are:

import boilerplate.*;

String kbOut = kbInput.get();

Since get() is a static method, there is no need to instantiate an object.

Finally, within the testApp project, I include a "Java Build Path" reference to kbInput.java.

I get the error message, "kbInput cannot be resolved to a type". I.e., it can't find the boilerplate package. I've attached a screenshot showing the package, source, and console panes. A second shows the kbInput class

index.php/fa/29335/0/
index.php/fa/29336/0/
  • Attachment: ECLIPSE.JPG
    (Size: 235.26KB, Downloaded 118 times)
  • Attachment: ECLIPSE1.JPG
    (Size: 87.55KB, Downloaded 107 times)
Re: Can't link to dependent class [message #1763793 is a reply to message #1763335] Fri, 19 May 2017 19:41 Go to previous messageGo to next message
John Smith is currently offline John SmithFriend
Messages: 4
Registered: November 2014
Junior Member
Right-click testApp project folder in Package Explorer and select Properties.
On the left side of the window that opens select "Java Build Path", then Projects tab and click "Add..." button.
In the window that opens click the square next to "boilerplate" project, click OK and OK. That should fix the error.
Re: Can't link to dependent class [message #1763796 is a reply to message #1763793] Fri, 19 May 2017 20:18 Go to previous message
Paul Marlin is currently offline Paul MarlinFriend
Messages: 2
Registered: May 2017
Junior Member
Thank you. That was easy.
Previous Topic:No exclamation mark after splitting editor
Next Topic:Transfering custom @Interfaces from super function to overriden function
Goto Forum:
  


Current Time: Fri Dec 15 16:05:45 GMT 2017

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

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