error: Package not imported in the manifest

I created a project from existing source, pointing to a directory which has 20 folders with hundreds of source files in them. The project shows errors throughout "Package not imported in manifest" as illustrated:

packagenotimportedmanifest.png
Obviously I would expect Swing to be available. There is a "META-INF" directory in each package directory with a "manifest.mf" file in it, for what purpose I know not. The manifest file for the source code file shown above has this text in it:


Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: ABC-Common-Model
Bundle-SymbolicName: com.abc.def.common.model
Bundle-Version: 7.0.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.6,
JavaSE-1.7
Import-Package: com.abc.menusystem.util;version="2.0.0",
javax.measure.quantity,
javax.measure.unit,
org.jscience.physics.amount
Export-Package: com.abc.def.common.feature.language,
com.abc.def.common.model,
com.abc.def.common.resources
Require-Bundle: org.jscience;bundle-version="4.3.1"



What is the problem?

1 comment
Comment actions Permalink

Hi John,

Of JRE packages, only java.* are provided by OSGi runtime, the rest need to be imported explicitly.
It seems to me that you don't use OSGi in your project, so just delete corresponding facets.

0

Please sign in to leave a comment.