先前可以正常运行的一程序,今天等我吃完午饭再次运行时,很意外地“嘎”了,提示如下:
仔细查看log信息:
…………
!ENTRY org.eclipse.osgi 2 0 2007-09-06 15:35:10.239
!MESSAGE The activator com.snopex.Activator for bundle DeliveryManagement is invalid
!STACK 0
org.osgi.framework.BundleException: The activator com.snopex.Activator for bundle DeliveryManagement is invalid
…………
!ENTRY org.eclipse.osgi 4 0 2007-09-06 15:35:10.271
!MESSAGE Application error
!STACK 1
org.eclipse.core.runtime.CoreException: Plug-in DeliveryManagement was unable to load class com.snopex.Application.
…………
综上多处可知,程序启动时类不能正常加载,很可能是RCP程序类路径的设置问题,找到Runtime标签页中的Classpath,但还是没有发现问题,因为所需的外部类都存在。无奈之时,就冲着刚开始学JAVA时的步骤,在Classpath里新增了个类库,名字只有个点(那一刻忽然感觉刚开始创建RCP程序时,当时里面也就有个点名字的类库),修改后保存,居然运行OK。修改前后如下图:
似乎一切都OK,可当我将点类库改成别的名字后,却发现也OK,顿生疑问。
查看资料关于Classpath的说明:The Classpath is the palce to delare the names of liabraries that constitute the Plug-in Classpath,it is recommended to leave this section blank...