在写Eclipse RPC应用的时候遇到了Authorization infrastructure (org.eclipse.core.runtime.comp

在写Eclipse RPC应用的时候遇到了Authorization infrastructure (org.eclipse.core.runtime.compatibility.auth) not installed的异常,具体如下:
!MESSAGE Authorization infrastructure (org.eclipse.core.runtime.compatibility.auth) not installed.
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/core/internal/runtime/auth/AuthorizationHandler
at org.eclipse.core.internal.runtime.InternalPlatform.initializeAuthorizationHandler(InternalPlatform.java:603)
at org.eclipse.core.internal.runtime.InternalPlatform.start(InternalPlatform.java:745)
at org.eclipse.core.internal.runtime.PlatformActivator.start(PlatformActivator.java:31)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:350)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1118)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:634)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:508)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:282)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:468)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:195)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:297)

在*.product中的Configuration->Add Required Plug-ins添加RCP plugin project所需的所有支持包即可(自己是这样做的)。
另外网上有其他的解决方法:
解决办法是在Dependencies列表里加入org.eclipse.core.runtime.compatibility.auth,并且放在org.eclipse.core.runtime之前。
我试过了,对于导出的项目来说,这中做法好像不行。

你可能感兴趣的:(java,eclipse,Security,osgi)