Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » import cannot be resolved
icon3.gif  import cannot be resolved [message #1058270] Mon, 13 May 2013 12:26 Go to next message
marco giudici is currently offline marco giudiciFriend
Messages: 204
Registered: February 2013
Location: Italy
Senior Member
Hi all,
I have the need to import a package that is already used in another Java project in my current project Scout.
I use the same import command, like this:

import org.generic.shared.instrumentdata;


this import in the standard Java program works fine, however im my Scout project doesn't work and the code is highlighted in red and show this message "The import xxx cannot be resolved".
I think I've forgotten something or have made some error, but I can not figure out where. Someone can help me to understand?

Thank you in advance for your help
Re: import cannot be resolved [message #1058272 is a reply to message #1058270] Mon, 13 May 2013 12:31 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan MotschFriend
Messages: 154
Registered: March 2010
Senior Member
I assume this is inside the MANIFEST.mf.
Could you provide the dependency hierarchy of the involved bundles?

A import dependency can fail due to many reasons. Often it is a mismatch of the jre used by the individual bundles or an os filter constraint or a fragment limitation.
Re: import cannot be resolved [message #1058277 is a reply to message #1058272] Mon, 13 May 2013 12:44 Go to previous messageGo to next message
Arthur vD is currently offline Arthur vDFriend
Messages: 52
Registered: March 2010
Member
If your MANIFEST.MF files aren't set up correctly yet:
Scout uses OSGi for modularization (plus Eclipse/Equinox extension points and extensions). In the OSGi bundle where your package resides you have to add it to the MANIFEST.MF "Export-Package" section. In the OSGi bundle where you want to use it, you add your bundle to the "Require-Bundle" section of the MANIFEST.MF or just the package to the "Import-Package" section(the latter only if you don't care from which bundle the package is provided).

For an introduction you can have a look at the information provided by the OSGi Alliance: http://www.osgi.org/Technology/HowOSGi

As Ivan writes, this could fail for different reasons.
Re: import cannot be resolved [message #1058305 is a reply to message #1058277] Mon, 13 May 2013 14:06 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
When you are in the eclipse java editor, what are the suggested Quick Fixes (you can display them with "CTRL 1" shortcut near the import statement).

I assume you will have something like:
Quote:
export the 'xxxx' package from the 'yyyy' plug-in
Re: import cannot be resolved [message #1058318 is a reply to message #1058277] Mon, 13 May 2013 14:39 Go to previous message
marco giudici is currently offline marco giudiciFriend
Messages: 204
Registered: February 2013
Location: Italy
Senior Member
Thank you Arthur and Ivan, I think this is a piece that I missing.
Now I check your information and if something isn't clear, I ask again your help.
Previous Topic:How to export / import NLS entries
Next Topic:Problem creating webservice Consumer
Goto Forum:
  


Current Time: Thu Apr 25 07:43:00 GMT 2024

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

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

Back to the top