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

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值