您的位置:首页 > 编程语言 > C语言/C++

ubuntu Eclipse C++ (CDT) Failed: Failed to load JavaHL Library.

2012-02-28 15:59 330 查看
The Eclipse C/C++ Development Tools (CDT) runs on top of the Eclipse Platform. The CDT provides advanced functionality for C/C++ developers, including:

* C/C++ Editor (basic functionality, syntax highlighting, code completion etc.)

* C/C++ Debugger (APIs & Default implementation, using GDB)

* C/C++ Launcher (APIs & Default implementation, launches and external application)

* Parser

* Search Engine

* Content Assist Provider

* Makefile generator

安装eclipse-SDK-3.0-linux-gtk.zip去www.eclipse.org下载一个eclipse3.0. 将eclipse-SDK-3.0-linux-gtk.zip解压到/opt中

编写一个脚本用于启动eclipse

1. #!/bin/bash

2. #

3. # 执行 eclipse 3

4. #

5. export JAVA_HOME=/usr/java/j2sdk1.4.2_11

6. export CLASSPATH=/usr/java/j2sdk1.4.2_11/lib

7. /opt/eclipse/eclipse -vm /usr/java/j2sdk1.4.2_06/bin/java -data /home/chenzhe/wo

8. rkspace &

9. # -vm 参数用以指定使用哪一个 jvm 来执行Eclipse,

10. # -date参数用以指定Eclipse的数据目录。

在此指定其存在用户根目录(/home/chenzhe/)下的workspace目录中

将脚本保存到/usr/local/bin中,叫eclipse,并给eclipse分配755权限

在桌面上创建一个启动器,随便选一个图标,路径设置到/opt/eclipse/eclipse,/opt/eclipse/icon.xpm是eclipse自身带的图标.

双击图标,或者在终端输入eclipse

eclipse快捷方式 http://caibaoying.javaeye.com/blog/46396
# C/C++ Source Add Block Comment Ctrl+Shift+/ C/C++ Editor

# C/C++ Source Add Include Ctrl+Shift+N C/C++ Editor

# C/C++ Source Comment Ctrl+/ C/C++ Editor

# C/C++ Source Find Declaration Ctrl+G C/C++ Editor

# C/C++ Source Find References Ctrl+Shift+G C/C++ Editor

# C/C++ Source Format Ctrl+Shift+F C/C++ Editor

# C/C++ Source Go to Matching Bracket Ctrl+Shift+P C/C++ Editor http://l.u.l.u.blog.163.com/#
# C/C++ Source Go to next C/C++ member Ctrl+Shift+向下键 C/C++ Editor

# C/C++ Source Go to previous C/C++ member Ctrl+Shift+向上键 C/C++ Editor

# C/C++ Source Open Declaration F3 C/C++ Editor

# C/C++ Source Open Definition Ctrl+F3 C/C++ Editor

# C/C++ Source Open Type Ctrl+Shift+T C/C++ Editor

# C/C++ Source Remove Block Comment Ctrl+Shift+\ C/C++ Editor

# C/C++ Source Show outline Ctrl+O C/C++ Editor

# C/C++ Source Uncomment Ctrl+\ C/C++ Editor

F5 step into

F6 step over

F8 continue

Workspace -> Project -> Folder -> File // Eclipse stores your projects in a folder called a workspace. project name eq folder name.

Workspace:

.metadata

Project:

.project .cproject

Window -> Show View -> Other -> Debug -> Memory...

Workbench Layout? 工作台

Properties -> C/C++ Build -> Settings -> GCC C++ Linker

导入Project到当前workspace: File -> Import -> General(导入本地已经存在的)/ SVN(从svn上导入)。

Debug:

-O0 -g3 -Wall -c -fmessage-length=0

cdt.managedbuild.config.gnu.exe.debug.1755123352

Release:

-O3 -Wall -c -fmessage-length=0

cdt.managedbuild.config.gnu.exe.release.426542286

cdt.managedbuild.tool.gnu.c.compiler.exe.release.1536376618

eclipse错误:

Failed to load JavaHL Library.

These are the errors that were encountered:

no libsvnjavahl-1 in java.library.path

no svnjavahl-1 in java.library.path

no svnjavahl in java.library.path

java.library.path = /home/zjl/desktop/eclipse/jre/lib/i386/client:/home/zjl/desktop/eclipse/jre/lib/i386:/usr/lib/xulrunner-addons:/usr/lib/xulrunner-addons:/usr/java/packages/lib/i386:/lib:/usr/lib

在linux下的eclipse上,只安装了svn的Subversion插件是不行的。还需要安装JavaHL库。在ubuntu中安装这个很简单,只需要在新立得包管理器中搜索libsvn-javahl就可以安装了。或是直接在控制台下通过sudo apt-get install libsvn-javahl安装,是一样的。

/usr/lib/jni/libsvnjavahl-1.so

/usr/lib/jni/libsvnjavahl-1.so.0

/usr/lib/jni/libsvnjavahl-1.so.0.0.0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐