marco giudici Messages: 172 Registered: February 2013 Location: Italy
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:
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?
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).