1

这个Bundle异常是因为一次又一次地改变工作空间而发生的吗?我以前正常运行的项目现在在运行时出现此异常。请帮帮我。我已经被这个问题困扰了2天。

      Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Project
Bundle-SymbolicName: com.spundhan.eboard.project; singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.spundhan.eboard.project.Activator
Bundle-Vendor: SPUNDHAN
Require-Bundle: org.eclipse.emf;bundle-version="2.6.0",
 org.eclipse.ui.console;bundle-version="3.5.100",
 org.jdom;bundle-version="1.1.1",
 org.eclipse.ui.navigator;bundle-version="3.5.101",
 org.eclipse.ui.navigator.resources;bundle-version="3.4.300",
 org.eclipse.ui.views.log;bundle-version="1.0.200",
 org.eclipse.ui.ide;bundle-version="3.7.0",
 org.eclipse.core.resources;bundle-version="3.7.101",
 org.eclipse.gef;bundle-version="3.7.2",
 org.eclipse.emf.ecore;bundle-version="2.7.0",
 org.eclipse.ui.views;bundle-version="3.6.0",
 org.eclipse.help;bundle-version="3.5.100",
 org.eclipse.help.ui;bundle-version="3.5.101",
 org.eclipse.ui.forms;bundle-version="3.5.101",
 org.eclipse.ui.intro.universal;bundle-version="3.2.500",
 org.eclipse.help.webapp;bundle-version="3.6.1",
 org.eclipse.ui.intro;bundle-version="3.4.100",
 org.eclipse.cdt.ui;bundle-version="5.2.2";resolution:=optional,
 com.spundhan.eboard.code;bundle-version="1.0.0",
 com.spundhan.eboard.emf;bundle-version="1.0.0",
 com.spundhan.eboard.gef;bundle-version="1.0.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Import-Package: com.spundhan.eboard.gef.components.model,
 com.spundhan.eboard.gef.model,
 com.spundhan.eboard.gef.part,
 com.spundhan.eboard.model,
 org.eclipse.core.resources,
 org.eclipse.jface.text,
 org.eclipse.ui.console
Bundle-ClassPath: .,
 libs/com.spundhan.licensing-1.0.0.jar,
 libs/log4j-1.2.15.jar,
 libs/RXTXcomm.jar,
 libs/com.spundhan.eboard.db-1.0.0.jar,
 .,
 libs/bcpg-jdk15-143.jar,
 libs/bcprov-jdk15-143.jar

活化剂:

package com.spundhan.eboard.project;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
 * The activator class controls the plug-in life cycle
 */
public class Activator extends AbstractUIPlugin {

    // The plug-in ID
    public static final String PLUGIN_ID = "com.spundhan.eboard.project"; //$NON-NLS-1$

    // The shared instance
    private static Activator plugin;

    /**
     * The constructor
     */
    public Activator() {
    }

    /*
     * (non-Javadoc)
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
     */
    @Override
    public void start(BundleContext context) throws Exception {
        super.start(context);
        plugin = this;
    }

    /*
     * (non-Javadoc)
     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
     */
    @Override
    public void stop(BundleContext context) throws Exception {
        plugin = null;
        super.stop(context);
    }

    /**
     * Returns the shared instance
     *
     * @return the shared instance
     */
    public static Activator getDefault() {
        return plugin;
    }

    /**
     * Returns an image descriptor for the image file at the given
     * plug-in relative path
     *
     * @param path the path
     * @return the image descriptor
     */
    public static ImageDescriptor getImageDescriptor(String path) {
        return imageDescriptorFromPlugin(PLUGIN_ID, path);
    }
}
4

1 回答 1

3

这是对我有用的解决方案。每个错误都是不同的,但让我们看看你是否幸运。

打开清单并转到构建选项卡。在运行时配置中,如果没有出现,点击“添加库”,然后只写一个点“ . ”。然后,将src/添加到运行时文件夹。

希望这可以帮助。

于 2013-03-13T12:38:26.067 回答