eclipse 无法加载 JavaHL 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11769989/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Failed to load JavaHL Library
提问by 1.21 gigawatts
After updating to Snow Lion I started receiving these errors in Flash Builder / Eclipse when trying to use SVN:
更新到 Snow Lion 后,当我尝试使用 SVN 时,我开始在 Flash Builder / Eclipse 中收到这些错误:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
/opt/subversion/lib/libsvnjavahl-1.0.dylib: Library not loaded: /usr/lib/libpq.5.dylib Referenced from: /opt/subversion/lib/libsvnjavahl-1.0.dylib Reason: no suitable image found. Did find: /usr/lib/libpq.5.dylib: mach-o, but wrong architecture /usr/lib/libpq.5.dylib: mach-o, but wrong architecture
no svnjavahl in java.library.path
java.library.path = .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
回答by Atul Kaushik
Try this:
尝试这个:
- Select Window>> Preferences
- Expand Team>> SVN
- Under SVN interfaceset Clientto SVNKit (Pure Java) SVNKit....
- 选择窗口>>首选项
- 扩展团队>> SVN
- 在SVN 界面下将Client设置为SVNKit (Pure Java) SVNKit...。
回答by Mark Phippard
If you do not need to use JavaHL, Subclipse also provides a pure-Java SVN API library -- SVNKit (http://svnkit.com). Just install the SVNKit client adapter and library plugins from the Subclipse update site and then choose it in the preferences under Team > SVN.
如果不需要使用JavaHL,Subclipse 还提供了一个纯Java SVN API 库——SVNKit (http://svnkit.com)。只需从 Subclipse 更新站点安装 SVNKit 客户端适配器和库插件,然后在 Team > SVN 下的首选项中选择它。
回答by makkasi
On Kubuntu, my path to the library changed because of installing another Java version. Here's the whole picture, but in short:
在 Kubuntu 上,由于安装了另一个 Java 版本,我的库路径发生了变化。这是整个图片,但简而言之:
sudo apt-get install libsvn-java
sudo find / -name libsvnjavahl-1.so
The output from the last command could look like this, for example:
最后一个命令的输出可能如下所示,例如:
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
This gives you the path, so you can add the following to your eclipse.ini
:
这为您提供了路径,因此您可以将以下内容添加到您的eclipse.ini
:
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/
回答by Federico
Check out this blog. It has a ton of information. Also if installing through brew don′t miss this note:
看看这个博客。它有大量的信息。此外,如果通过 brew 安装,请不要错过此注释:
You may need to link the Java bindings into the Java Extensions folder:
您可能需要将 Java 绑定链接到 Java Extensions 文件夹中:
$ sudo mkdir -p /Library/Java/Extensions
$ sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
回答by catrapture
I Just installed Mountain Lion and had the same problem I use FLashBuilder (which is 32bit) and MountainLion is 64bit, which means by default MacPorts installs everything as 64bit. The version of subclipse I use is 1.8 As i had already installed Subversion and JavaHLBindings I just ran this command:
我刚刚安装了 Mountain Lion 并且遇到了同样的问题,我使用 FLashBuilder(32 位)而 MountainLion 是 64 位,这意味着默认情况下 MacPorts 将所有内容安装为 64 位。我使用的 subclipse 版本是 1.8 因为我已经安装了 Subversion 和 JavaHLBindings 我刚刚运行了这个命令:
sudo port upgrade --enforce-variants active +universal
This made mac ports go through everything already installed and also install the 32bit version.
这使得 mac 端口通过已经安装的所有内容并安装 32 位版本。
I then restarted FlashBuilder and it no longer showed any JavaHL errors.
然后我重新启动 FlashBuilder,它不再显示任何 JavaHL 错误。
回答by Prince
You may or may not need JavaHL depending on your OS. In addition to other suggestions just posting this here.
根据您的操作系统,您可能需要也可能不需要 JavaHL。除了其他建议,只需在此处发布即可。
For other OS see this source: http://subclipse.tigris.org/wiki/JavaHL
对于其他操作系统,请参阅此来源:http: //subclipse.tigris.org/wiki/JavaHL
回答by Evan
maybe you can try this: change jdk version. And I resolved this problem by change jdk from 1.6.0_37 to 1.6.0.45 . BR!
也许你可以试试这个:更改 jdk 版本。我通过将 jdk 从 1.6.0_37 更改为 1.6.0.45 解决了这个问题。BR!
回答by Web Development
i tried every single solution available and finally for me the problem was:
我尝试了所有可用的解决方案,最后对我来说问题是:
uninstall Native JavaHL 1.6
install everything under Subclipse from this site:
回答by sasfour
For me i started getting this problem when I upgraded to java 8, and then reverted back to java 7. Upgraded again to java 8 and the problem got resolved.
对我来说,当我升级到 java 8 时,我开始遇到这个问题,然后又恢复到 java 7。再次升级到 java 8,问题得到了解决。
回答by OreaSedap
For Eclipse/STS v3.9.X windows user, you may need to update your subclipse version.
对于 Eclipse/STS v3.9.X windows 用户,您可能需要更新您的 subclipse 版本。
Go to Help> Install New Software> Click on Subclipseand editthe version from 1.6.Xto 1.8.X
转到帮助>安装新软件>单击 Subclipse并将版本从1.6.X编辑为1.8.X
This method also apply to those who encounter JavaHL not available. You can check whether JavaHL is available or not by Go to Windows> Preference> Team> SVN. You may check it in SVN Interface> Clientsection.
这种方法也适用于那些遇到JavaHL 不可用的情况。您可以通过转到Windows> Preference> Team> SVN来检查 JavaHL 是否可用。您可以在SVN Interface> Client部分检查它。
If this work on MAC OS, kindly response in comment section. :)
如果这适用于 MAC OS,请在评论部分回复。:)