简体   繁体   English

安装Subeclipse Eclipse插件时出现问题,缺少JavaHL库

[英]Problems to installa Subeclipse Eclipse plugin, JavaHL Library missing

I have installed Eclipse Kepler on my Ubuntu 12.04 LTS system and I am finding many difficulties installing Subclipse plugin on it. 我已经在Ubuntu 12.04 LTS系统上安装了Eclipse Kepler,在安装Subclipse插件时遇到了很多困难。

I have do the following steps: 我已执行以下步骤:

  1. I am go into Help ---> Install New Software and I have add this repository URL: http://subclipse.tigris.org/update_1.10.x/ for Subeclipse plugin 我进入帮助--->安装新软件 ,并添加了此存储库URL: http : //subclipse.tigris.org/update_1.10.x/用于Subeclipse插件

  2. Now appear to me the possibilities to dowload some packages divided into the following categories: Subeclipse and SVNKit , I have installed all the packages that are into these categories. 现在对我来说,可以下载一些软件包,分为以下几类: SubeclipseSVNKit ,我已经安装了属于这些类别的所有软件包。

Now I would import in my workspace a project that are on a SVN server and I do the following operation: 现在,我将在工作区中导入SVN服务器上的项目,然后执行以下操作:

File ---> New ---> Project --> SVN ---> Checkout Projects from SVN ---> click on Next button ---> Create a new repository location ---> here in the URL field I insert the address of my SVN repository and click on the Next button 文件--->新建--->项目-> SVN --->从SVN签出项目--->单击下一步按钮--->创建新的存储库位置--->在URL字段中插入我的SVN信息库的地址,然后单击下一步按钮

So now appear to me the following error screen that say to me that I have not the required JavaHL Library : 因此,现在向我显示以下错误屏幕,告诉我我没有必需的JavaHL库

在此处输入图片说明

The error message say that: 错误消息说:

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 = /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

I have tryied to download it from the Eclipse "Install new software" wizard but seems not exist here... 我试图从Eclipse“安装新软件”向导中下载它,但是这里似乎不存在...

What can I do to install it on my Ubuntu 12.04 system? 如何在Ubuntu 12.04系统上安装它?

Tnx 特纳克斯

Andrea 安德里亚

From Subclipse: Wiki: JavaHL Subclipse:Wiki:JavaHL

How do I get JavaHL? 我如何获得JavaHL?

  • In Debian/Ubuntu the package name is libsvn-java so you can just run this command to install the library: 在Debian / Ubuntu中,软件包名称为libsvn-java因此您只需运行以下命令即可安装该库:
    • $ apt-get install libsvn-java # Use sudo in Ubuntu
  • Next, find the path where the JavaHL library is installed, as you will need to know this path for the following instructions: 接下来,找到JavaHL库的安装路径,因为您需要了解以下说明的路径:
    • $ find / -name libsvnjavahl-1.so # Use sudo in Ubuntu

Although the library is installed, you still have to tell Java (when used for Eclipse) where to find it. 尽管已经安装了该库,但是您仍然必须告诉Java(当用于Eclipse时)在哪里可以找到它。 The JVM on Linux does not look in a lot of the standard locations to find the libraries. Linux上的JVM不会在很多标准位置中查找库。 (This could obviously change in the future.) For example, 32-bit Debian/Ubuntu uses a standard location of /usr/lib/jni for libraries to be used from Java. (将来可能会明显改变。)例如,32位Debian / Ubuntu使用/ usr / lib / jni的标准位置来从Java使用库。 However, the Oracle JVM does not currently look in this location. 但是,Oracle JVM当前不在此位置。 The easiest way to tell Java where to find the JavaHL library is to specify the following when starting the JVM: 告诉Java在哪里可以找到JavaHL库的最简单方法是在启动JVM时指定以下内容:

-Djava.library.path=</path/to/library>

Example: 例:

-Djava.library.path=/usr/lib/jni

Eclipse provides its own mechanism for providing this setting. Eclipse提供了自己的机制来提供此设置。 Eclipse comes with a file named eclipse.ini. Eclipse带有一个名为eclipse.ini的文件。 This file is looked at when the Eclipse launcher starts the JVM and appends settings to the JVM when launching it. 在Eclipse启动器启动JVM并在启动时将设置附加到JVM时查看该文件。 Specifically, you should see a line that says "-vmargs". 具体来说,您应该看到一行显示“ -vmargs”的行。 Add a newline after this line and insert the above line to pass the setting the JVM needs. 在此行之后添加一个换行符,并插入上面的行以传递JVM需要的设置。 Each argument needs to be on its own line, so be sure to add a new line and then put the entire string above on its own line. 每个参数都必须在自己的行上,因此请确保添加新行,然后将整个字符串放在自己的行上。

Here is an example of this file from Eclipse 3.4: 这是Eclipse 3.4中此文件的示例:

-showsplash
org.eclipse.platform
-framework
plugins/org.eclipse.osgi_3.4.0.v20080605-1900.jar
-vmargs
-Djava.library.path=/opt/CollabNet_Subversion/lib
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m

The JavaHL library needed for the adapter does not come with Ubuntu. 适配器所需的JavaHL库不是Ubuntu随附的。 Use the SVNKit Client Adapter instead. 请改用SVNKit Client Adapter See http://www.rarejava.com/blog/2011/05/installing-subclipse-with-svnkit 参见http://www.rarejava.com/blog/2011/05/installing-subclipse-with-svnkit

But as Andrew commented I would also recommend using Subversive instead. 但是正如安德鲁所说,我也建议改用Subversive。 Although you need one of the adapters for Subversive too if I remember correctly. 如果我没记错的话,虽然您也需要Subversive的适配器之一。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM