Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » FAQ For "The import XXX cannot be resolved" when browsing source?
FAQ For "The import XXX cannot be resolved" when browsing source? [message #183573] Sat, 09 December 2006 01:31 Go to next message
Eclipse UserFriend
Originally posted by: rob.torenware.com

I'm starting to work with Eclipse and BIRT, and have not yet found a
specific FAQ for this problem: when I import source from another
project, most classes not in the standard Java libraries do not
"resolve" -- i.e., the Eclipse 3.2 editor can't figure out where the
definitions are. I've found the Project/Properties/Java Build
Path/Libraries, and have figured out that I need to import an external
JAR. But I can't figure out where the JARs are in the install, and
which specific JAR I need to import.

Here's a samples list:

> import org.eclipse.birt.report.designer.ui.dialogs.properties.IProp ertyPage;
> import org.eclipse.jface.wizard.WizardPage;
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.graphics.FontData;


I found JARs for resolving the org.eclipse.jface... and
org.eclipse.swt... imports in the eclipse/plugins directory, and just
imported pretty much every damn JAR in the directory. And I do have
BIRT (2.1, I believe) installed, so that I can actually use the BIRT
report designer, and I have BIRT sections in Help.

But I can't find what JAR to include to make
org.eclipse.birt.report.designer.ui.dialogs.properties.IProp ertyPage
resolve, even after including all of the JARs that BIRT dumps into
eclipse/plugins.

How can I get this import to resolve, and how in general do I figure out
how to get eclipse to see the correct JARs? And how do you figure out
which JARs you really need? In C++ or C I'd just be looking for the
right INCLUDE directories. What do I need to do for Java and eclipse?

Back in 2005, someone said there were FAQs for something relevant at:
> http://www.eclipsefaq.org/chris/faq/html/faq104.html
> http://www.eclipsefaq.org/chris/faq/html/faq105.html

These URLs aren't live anymore (they go to the top level of the Eclipse
wiki, so I'm not sure what info was there, or where it is now.

I'm using Eclipse 3.2 with BIRT 2.1.1 on a Linux Fedora 5 install, if
that helps.

Thanks,
Rob
Re: FAQ For "The import XXX cannot be resolved" when browsing source? [message #183583 is a reply to message #183573] Sat, 09 December 2006 02:06 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Rob Thorne" <rob@torenware.com> wrote in message
news:eld3jc$ira$1@utils.eclipse.org...
> I'm starting to work with Eclipse and BIRT, and have not yet found a
> specific FAQ for this problem: when I import source from another project,
> most classes not in the standard Java libraries do not "resolve" -- i.e.,
> the Eclipse 3.2 editor can't figure out where the definitions are. I've
> found the Project/Properties/Java Build Path/Libraries, and have figured
> out that I need to import an external JAR. But I can't figure out where
> the JARs are in the install, and which specific JAR I need to import.
> [...]

Usually, if you're writing something based on the Eclipse framework, you're
writing plug-ins. In that case, what you need to do is get your plug-in
dependencies correct (in the MANIFEST.MF, for which there's a handy GUI
editor provided by PDE, the Plug-in Development Environment); and then the
editor itself will find and insert the actual import statements into your
Java code. You can Ctrl+Shift+O to "Organize Imports" and it'll find all
the missing imports, or you can do them one by one by right-clicking the
quick-fix tips next to your red-squiggled class invocations. You don't need
to put anything at all on your Java build path; it's all handled by the PDE
Classpath Container.

If you're writing ordinary Java projects rather than plug-ins, then you do
indeed have to put jar files on the build path. But even in that case, the
editor will handle inserting the imports.
Previous Topic:Running a BIRT report having XML data source
Next Topic:MS Keyboard Scheeme?
Goto Forum:
  


Current Time: Thu Apr 25 06:11:18 GMT 2024

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

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

Back to the top