Eclipse plugin: NoClassDefFoundError for org / eclipse / jdt / ui / JavaUI

I am creating a plugin that requires the jdt.ui.JavaUI class. I have included the jdt.ui plugin depending. This is my Manifest.MF:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: PanelGenerator Plug-in
Bundle-SymbolicName: PanelGeneratorPlugin; singleton:=true
Bundle-Version: 0.1.0
Bundle-Activator: panelgenerator.plugin.Activator
Require-Bundle: org.eclipse.jdt.core,
 org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.core.resources,
 org.eclipse.ui.ide,
 org.eclipse.jdt.ui
Eclipse-LazyStart: true

and these are my build.properties properties:

source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
           META-INF/,\
           .,\
           icons/,\
           templates/

During compilation, I get no compilation errors. If I debug a plugin using Eclipse (Debug as -> Eclipse Application), it works fine.

However, when I export it, install it by copying it to the Eclipse plugins folder, the plugin does not work. Once the JavaUI class is used, nothing happens. The error log reports this:

java.lang.NoClassDefFoundError: org/eclipse/jdt/ui/JavaUI

Any ideas on why this is happening?

+3
source share
4 answers

"-" ! , .

:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: PanelGenerator Plug-in
Bundle-SymbolicName: PanelGeneratorPlugin; singleton:=true
Bundle-Version: 0.1.0
Bundle-Activator: panelgenerator.plugin.Activator
Require-Bundle:  org.eclipse.core.runtime,
 org.eclipse.core.resources,
 org.eclipse.jdt.core,
 org.eclipse.ui,
 org.eclipse.ui.ide,
 org.eclipse.jdt.ui
Eclipse-LazyStart: true

, eclipse . , "" "-". , .

+2

, , , , , , - . - eclipse 177476, .

0

Eclipse ? 3.4 (Ganymede) 3.5 (Galileo), . dropins ( dropins).

, P2 .

Eclipse, .log, , .

0

, eclipse, ( org.eclipse.jdt.ui). , , org.eclipse.core , .

, :

  • Copy the exported jar to the dropins folder (not plugins). The plugin will be installed the next time you run eclipse.
  • Export and install to host
  • Create a project, update the site and install the plugin through the "Install New Software" menu.
0
source

Source: https://habr.com/ru/post/1719099/


All Articles