[问题]安装eclipse for c/c++出错,请高人指点下

C、C++和Java语言
回复
gbd
帖子: 33
注册时间: 2007-10-17 18:23
送出感谢: 0
接收感谢: 0

[问题]安装eclipse for c/c++出错,请高人指点下

#1

帖子 gbd » 2007-11-15 22:12

安装了jdk1.5 然后下载了Eclipse IDE for C/C++ Developers - Linux (63 MB)(3.3.11),解压后运行eclipse,可以进入eclipse界面,但报错:java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin[/img]
gbd
帖子: 33
注册时间: 2007-10-17 18:23
送出感谢: 0
接收感谢: 0

#2

帖子 gbd » 2007-11-15 22:39

出错信息:
java.lang.ClassNotFoundException: org.eclipse.core.runtime.Plugin
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:434)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(libgcj.so.81)
at org.eclipse.core.runtime.Platform.getPlugin(Platform.java:736)
at org.eclipse.core.internal.preferences.legacy.InitLegacyPreferences.init(InitLegacyPreferences.java:43)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelper.java:146)
at org.eclipse.core.internal.preferences.PreferencesService.applyRuntimeDefaults(PreferencesService.java:337)
at org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults(DefaultPreferences.java:163)
at org.eclipse.core.internal.preferences.DefaultPreferences.loadDefaults(DefaultPreferences.java:236)
at org.eclipse.core.internal.preferences.DefaultPreferences.load(DefaultPreferences.java:232)
at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:307)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:543)
at org.eclipse.core.internal.preferences.DefaultPreferences.node(DefaultPreferences.java:150)
at org.eclipse.core.internal.preferences.legacy.PreferenceForwarder.getDefaultPreferences(PreferenceForwarder.java:130)
at org.eclipse.core.internal.preferences.legacy.PreferenceForwarder.getString(PreferenceForwarder.java:636)
at org.eclipse.ui.internal.navigator.NavigatorActivationService.revertExtensionActivations(NavigatorActivationService.java:269)
at org.eclipse.ui.internal.navigator.NavigatorActivationService.<init>(NavigatorActivationService.java:82)
at org.eclipse.ui.internal.navigator.NavigatorContentService.getActivationService(NavigatorContentService.java:1029)
at org.eclipse.ui.internal.navigator.NavigatorContentService.<init>(NavigatorContentService.java:143)
at org.eclipse.ui.internal.navigator.NavigatorContentService.<init>(NavigatorContentService.java:155)
at org.eclipse.ui.navigator.CommonViewer.<init>(CommonViewer.java:82)
at org.eclipse.ui.navigator.CommonNavigator.createCommonViewer(CommonNavigator.java:405)
at org.eclipse.ui.navigator.CommonNavigator.createPartControl(CommonNavigator.java:157)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:370)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPage.java:1189)
at org.eclipse.ui.internal.WorkbenchPage.updateActivePart(WorkbenchPage.java:1173)
at org.eclipse.ui.internal.WorkbenchPage.handleDeferredEvents(WorkbenchPage.java:1349)
at org.eclipse.ui.internal.WorkbenchPage.deferUpdates(WorkbenchPage.java:1338)
at org.eclipse.ui.internal.WorkbenchPage.access$16(WorkbenchPage.java:1329)
at org.eclipse.ui.internal.WorkbenchPage$15.runWithException(WorkbenchPage.java:3172)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3296)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2974)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:801)
at org.eclipse.ui.internal.Workbench$25.runWithException(Workbench.java:1342)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3296)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2974)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2309)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at java.lang.reflect.Method.invoke(libgcj.so.81)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
头像
hubert_star
论坛版主
帖子: 5372
注册时间: 2007-10-29 22:12
系统: OSX 10.9 + Ub 1304
来自: 江苏南京
送出感谢: 0
接收感谢: 5 次

#3

帖子 hubert_star » 2007-11-15 22:46

第一,运行一下java -version确认java的版本是正确的,是java sdk而不是gcj
第二,检查一下你的插件,到eclipse官方网站去看一下cdt需要额外加入哪些插件,是否插件没有安装。一般而言安装了eclipse sdk后在eclipse的更新里面安装cdt好一些。
第三,最好用eclipse官方下载的压缩包手动安装,而不要用源里面提供的软件包。eclipse这样的应用还是要在官方网站下。
gbd
帖子: 33
注册时间: 2007-10-17 18:23
送出感谢: 0
接收感谢: 0

#4

帖子 gbd » 2007-11-15 23:03

谢谢楼上的提醒。我运行java -version 后提示如下,不知道对不对:

java version "1.5.0"
gij (GNU libgcj) version 4.2.1 (Ubuntu 4.2.1-5ubuntu5)

Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

如果不对,该怎样设置? 我到sun下载的 jdk-1_5_0_14-linux-i586.bin 并安装的。
头像
hubert_star
论坛版主
帖子: 5372
注册时间: 2007-10-29 22:12
系统: OSX 10.9 + Ub 1304
来自: 江苏南京
送出感谢: 0
接收感谢: 5 次

#5

帖子 hubert_star » 2007-11-15 23:51

最简单你把jdk/jre/bin和jdk/bin加入到你的path变量前面,或者更改系统的java命令引用,找一下linux安装java的帖子,很多的。
vupiggy
帖子: 89
注册时间: 2006-03-19 18:25
来自: FZ->TJ->PEK->AMS->MTL
送出感谢: 0
接收感谢: 0

#6

帖子 vupiggy » 2007-11-16 2:20

把插件(那些.jar文件)的路径加到CLASSPATH里
gbd
帖子: 33
注册时间: 2007-10-17 18:23
送出感谢: 0
接收感谢: 0

#7

帖子 gbd » 2007-11-16 8:50

谢谢各位,确实是这个问题,加了路径就对了
gaochang
帖子: 19
注册时间: 2007-11-04 22:56
送出感谢: 0
接收感谢: 0
联系:

gdb 你是怎么解决你的问题的,

#8

帖子 gaochang » 2007-11-21 9:11

7楼的 gdb 你是怎么解决你的问题的,

我的也出现这个问题了,,patch变量在那里进行设置,,兄弟们说仔细点好吗
gbd
帖子: 33
注册时间: 2007-10-17 18:23
送出感谢: 0
接收感谢: 0

#9

帖子 gbd » 2007-11-26 13:21

把这个加在你的home/用户名/.bashrc里面
export PATH=/usr/local/java/jdk1.5.0_14/bin:$PATH
export JAVA_HOME=/usr/local/java/jdk1.5.0_14
export CLASSPATH=$JAVA_HOME/lib:.
注意红色是java sdk 安装的路径,要根据你自己的改下。
回复

回到 “C/C++/Java”