ppatierno ppatierno -4 years ago 304
Java Question

Eclipse Mars : The import org.osgi cannot be resolved

I'm using Eclipse Mars (latest version) to create an OSGI bundle with an Activator class.
For this, I'm using the Plug-In Project selecting "OSGI framework" to "standard" (but if I select "Equinox" I had same result) on creation.
The Activator class is empty for now but the compiler already raises me following errors :

The import org.osgi cannot be resolved
BundleActivator cannot be resolved to a type
BundleContext cannot be resolved to a type

Why ?

Thanks,
Paolo.

Answer Source

Finally I solved.

The target platform wasn't selected.

Paolo.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download