Eclipse / Java newbie: package not found now but yesterday

I will be participating in the development of Java for the first time. The application will be built on a set of Eclipse plugins and packages called UDOP. This kit comes with the tutorials I'm looking at.

Everything was fine yesterday, and in my code example, I was able to import a specific package and extend one of the classes that it contains. When I started Eclipse today, the package in the import statement has a red line below it, with a hover message telling me that import cannot be allowed. The target platform is correct, and my dependencies match what the tutorial wants. I started the path to the update class.

More details:

  • import statement

    import com.tdkc.udop.extensionpoints.views.ViewPartBase;
    
  • The squiggly red line is under com.tdkc.udop.extensionpoints.

  • com.tdkc.udop installs as a dependency.

  • Target platform ... / UDOP _SDK,

  • and under that I can find the file ... / UDOP _SDK / plugins / com.tdkc.udop_1.7.0 / com / tdkc / udop / extensionpoints / views / ViewPartBase.class

  • com.tdkc.udop appears in the Package Explorer and from within PE I can go down and see ViewBasePart.class.

Although I am new to Eclipse and Java, I have average experience with C ++ and Objective-C and Cocoa.

What possible reasons for import were not found? What should I check? Thank.

+5
source share
3 answers

If nothing has changed since the last time everything was peachy, maybe this is just a question Project -> Clean, and then choose Clean all projectsas follows:

enter image description here

Finally, click OK, and Eclipse should clear all projects and build everything.

+5
source

( Eclipse " " ) " " > " ...".

"Java Build Path", "". " JAR..." JAR , . /.

+2

If this import statement is what you used, the syntax is incorrect. It should be: import com.tdkc.udop.extensionpoints.views.ViewPartBase;

+1
source

All Articles