How to upgrade JavaHL on Ubuntu? - eclipse

Environment
Ubuntu 10.10
Eclipse Java EE Indigo Service Release 1
Subclipse 1.8.x
libsvn1 1.6.12
svn 1.7.x
Problem
Subclipse 1.8.x requires JavaHL version 1.7.x. I need Subclipse 1.8.x in order to use svn 1.7.x.
Ubuntu 10.10 does not have subversion 1.7 packages or libsvn1 1.7 packages.
Question
Is there any way to upgrade the libsvn1 package on Ubuntu, possibly by configuring another package repository or installing the package directly? If the latter is possible, where can I find the libsvn1/JavaHL packages? Surely someone else must be trying to use svn 1.7 on this Ubuntu version right?

(Copied from another answer)
Remove your existing libsvn-java:
sudo apt-get purge libsvn-java
Then, add the following software source and re-install:
sudo add-apt-repository ppa:dominik-stadler/subversion-1.7
sudo apt-get update
sudo apt-get install libsvn-java
(found here)
Update: for Ubuntu 14 use the subversion 1.8 repo instead
sudo add-apt-repository ppa:dominik-stadler/subversion-1.8
(Thanks to #YetAnotherMatt's answer below)

If you do not want to mess around with your Ubuntu packages while you wait for them to update to SVN 1.7.x, one thing you can do is install the CollabNet client RPM. This installs into a private namespace (/opt/CollabNet_Subversion) so it does not alter any of your Ubuntu packages. You can install the RPM by using the "alien" package. We have had Subclipse users confirm that this client works for them.
http://www.open.collab.net/downloads/subversion/linux.html

I think the real problem is that the jni location changed in 14.04 from /usr/lib/jni to something like /usr/lib/x86_64-linux-gnu/jni
I recommend editing your eclipse ini's vmargs java.library.path setting thus
ORIGINAL: -Djava.library.path=/usr/lib/jni
NEW: -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni
This setting determination from where eclipse expects to locate the library files

#VishalKale, and anyone else trying to follow #jlb's instructions on more recent versions of Ubuntu, use the Subversion-1.8 repository instead:
sudo add-apt-repository ppa:dominik-stadler/subversion-1.8
For more details: Getting subclipse to work on Ubuntu 64 and Indigo - Incompatible JavaHL library loaded. 1.7.x or later required

Related

Failed to load JavaHL Library

After updating to Snow Lion I started receiving these errors in Flash Builder / Eclipse when trying to use SVN:
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
Try this:
Select Window >> Preferences
Expand Team >> SVN
Under SVN interface set Client to SVNKit (Pure Java) SVNKit....
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.
On Kubuntu, my path to the library changed because of installing another Java version. Here's the whole picture, but in short:
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
This gives you the path, so you can add the following to your eclipse.ini:
-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni/
Check out this blog. It has a ton of information.
Also if installing through brew donĀ“t miss this note:
You may need to link the Java bindings into the Java Extensions folder:
$ sudo mkdir -p /Library/Java/Extensions
$ sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
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:
sudo port upgrade --enforce-variants active +universal
This made mac ports go through everything already installed and also install the 32bit version.
I then restarted FlashBuilder and it no longer showed any JavaHL errors.
You may or may not need JavaHL depending on your OS. In addition to other suggestions just posting this here.
For other OS see this source: http://subclipse.tigris.org/wiki/JavaHL
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!
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:
http://subclipse.tigris.org/update_1.10.x>
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.
For Eclipse/STS v3.9.X windows user, you may need to update your subclipse version.
Go to Help > Install New Software > Click on Subclipse and edit the version from 1.6.X to 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 > Client section.
If this work on MAC OS, kindly response in comment section. :)
My Understanding - Basically, svn client comes by default on Mac os. While installing in eclipse we should match svn plugin to the mac plugin and javaHL wont be missing. There is a lengthy process to update by installing xcode and then by using homebrew or macports which you can find after googling but if you are in hurry use simply the steps below.
1) on your mac terminal shell
$ svn --version
Note down the version e.g. 1.7.
2) open the link below
http://subclipse.tigris.org/wiki/JavaHL
check which version of subclipse you need corresponding to it. e.g.
Subclipse Version SVN/JavaHL Version
1.8.x 1.7.x
3) ok, pick up url corresponding to 1.8.x from
http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA
and add to your eclipse => Install new Software under help
select whatever you need, svn client or subclipse or mylyn etc and it will ask for restart of STS/eclipse thats it you are done. worked for me.
NOTE: if you already have multiple versions installed inside your eclipse then its best to uninstall all subclipse or svn client versions from eclipse plugins and start fresh with steps listed above.

What is the yum command to install Eclipse Indigo for Java EE developers?

I want to install Eclipse Indigo for Java EE developers in CentOS through yum command.
yum install eclipse ...
What is the exact command?
Download the Eclipse archive from the Eclipse website. Unpack it in a suitable location. The unpacked directory tree includes the executable. It is not packaged using RPM. The RedHat (and other O/S) provided versions are usually very old and do not include the Java EE Eclipse modules.
yum install eclipse-platform
for the latest eclipse version :)
If you want JEE you can install the plugin afterwards
Edit:
For CentOS 8 you have to enable the eclipse module and install the package:
dnf module enable eclipse
dnf install eclipse
CentOS 6 includes Eclipse 3.6.1 (Helios) so it's not possible to install Eclipse 3.7 (Indigo) through Yum.
You can either install it manually like Raedwald explained OR you could use Fedora 16 which ships Indigo.
Since RHEL/CentOS is very conservative regarding software versions, I wouldn't expect Indigo to be supported any time soon.
Like the others have answered, you need to install it manually if your yum doesn't have it.
This is the guide I used to do this: http://www.if-not-true-then-false.com/2010/linux-install-eclipse-on-fedora-centos-red-hat-rhel/
I used it with Fedora 17 which supports Eclipse 4.2 (juno) instead of 3.7 (indigo).
To run them side-by-side you can first install the yum version, then rename /bin/eclipse and /usr/share/applications/eclipse.desktop to something you want like eclipse-yum then update eclipse-yum.desktop to reference eclipse-yum
Finally, install it as the guide explains.

svn for eclipse on mac os lion

I need to use Subversion with Eclipse on Mac Lion. I encounter problem as below
I saw: Subclipse in Mac OS Lion shows "Unable to load default SVN client" error
In my context:
I use Mac OS Lion 10.7.2
Eclipse version: 3.7.1 64 bit
I install Subversion: Universal Subversion 1.6.17 Binaries for Lion (Mac OS X 10.7) in the page: http://www.open.collab.net/downloads/community/
I install Subclipse by the "Install New Software..." feature of Eclipse with the update link: http://subclipse.tigris.org/update_1.8.x
It install Subclipse 1.8.2, JavaHL 1.7.1.1 and some other packages.
When I go to menu Preferences/ Team / SVN , it produce error: "Incompatible JavaHL library loaded. 1.7.x or later required."
I find to install SVN Kit, so use it instead of JavaHL as the very first link refer (here), but I don't see it in Subclipse package.
The issue is that you need the right native Subversion libraries for the version of Subclipse you use. This page has information and a chart of the versions:
http://subclipse.tigris.org/wiki/JavaHL
The binaries on CollabNet website are still for SVN 1.6 so you either need to get SVN 1.7 binaries (MacPorts and Homebrew are good places to get it) or you need to use Subclipse 1.6.x.
Follow the steps as below to get it working:
Install subclipse via update url: http://subclipse.tigris.org/update_1.8.x
Install subversion using the binary from here: http://www.ubersvn.com/download (scroll down to "Command-Line Client 1.6.18 and 1.7.6 certified by WANdisco" section since that's all you need)
I found a solution (download from WanDisco instead of CollabNet) in this thread: Subclipse in Mac OS Lion shows "Unable to load default SVN client" error
I went to this topic because I was in need to make SVN 1.7 to work with subclipse.
For those with the same problem, the easiest way to fix it is to install Subversion and JavaHL from MacPorts.
The packages you need to install with macports are subversion and subversion-javahlbindings (check here), they are both 1.7.1.
With these packages you can install the subclipse using the update site with version 1.8.x. (http://subclipse.tigris.org/update_1.8.x)
If you don't have macports installed follow these instructions. I am sure it will be useful for other things too. You also need to install XCode from AppStore.
Installing the binaries from http://www.wandisco.com/subversion/download#osx fixed this issue for me.
In case anyone using homebrew wants SVN version 1.6 support (as I did due to interacting with some old servers), here is how I got it to work:
Install SVN 1.6 via homebrew:
brew tap homebrew/versions
brew info homebrew/versions/subversion16
brew install homebrew/versions/subversion16 --java
Ensure that /usr/local/bin is in your PATH before /usr/bin, so that homebrew's SVN is ran instead of OS X's.
If using Eclipse:
Be sure to install Subclipse 1.6 (e.g. use the 1.6 update site) instead of the newest one.
If you follow the homebrew formula instructions to link the java library to OS X's Extensions, you do NOT have to edit your Eclipse.ini file to include the path there. For posterity, those commands are:
sudo mkdir -p /Library/Java/Extensions
sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
HTH
This post resolved my problem: http://bridgetconsulting.com/?p=64 Requires MacPorts
Add to /opt/local/etc/macports.conf this line
universal_archs i386 x86_64
and run
sudo port install subversion-javahlbindings +no_bdb +universal
I installed subversion 1.7 and the java-hl bindings using homebrew by following the instructions here.
Specifically:
[sudo] brew install subversion --universal --java
Then linking the installed libraries in /Library/Java/Extensions so eclipse picked them up.
/Library/Java/Extensions $ sudo ln -sf /usr/local/lib/libsvnjavahl-1.dylib
/Library/Java/Extensions $ sudo ln -sf /usr/local/lib/libsvnjavahl-1.jnilib
You only installed the Java HL package. Uninstall JavaHL and install the SVN Kit. You can find options for connecting in Preferences -> Team...

how to tell ubuntu apt-get to install eclipse in other than the default version

eclipse is installed with apt-get in version 3.5:
sudo apt-get install eclipse-platform
however I would like to install 3.6.
how to specify that?
For a given Debian distro version, apt has only one version of any given software.
This is because apt tries to solve the problem of dependencies (just like maven in the java
domain if this speaks to you).
If you "lie" about your version, apt won't complain, it's your own risk. As for eclipse there is little risk as eclipse is only dependent on java versions (for a given os/32-64/gui lib).
In 10.10 the eclipse standard version is 3.5sr2
But in natty narwhal it's 3.6, so you could try to use the
An even safer solution is to add a PPA to your repositories list (synaptic => settings => repository for instance or update manager) there are other PPA that offer helios
Best example:
The Eclipse ppa which has the 3.6 version (follow the PPA configuration instructions if you have never added a ppa before.
This answers your question. Howewer I tend to discourage using apt for eclipse (see SO answers here and here)
That doesn't. I typed this:
sudo add-apt-repository ppa:itachi-sama-amaterasu/redeclipse-client sudo apt-get update sudo apt-get install redeclipse
This doesn't install the updated version, but it helps a bit...
If you know that version 3.6 is published as a package for 10.10, you should try
sudo apt-get update
And then try to install eclipse. If it's not published you have to wait or build it by yourself.

can't install eclipse 3.6 in ubuntu 10.04

I can't install eclipse 3.6 in ubuntu 10.04
Synaptic gives me version 3.5.2 but the current version is 3.6.1
I tried sudo add-apt-repository ppa:eclipse-team/debian-package but still nothing.
Is there another repository, or should i download and install manually?
EDIT: I chose to work with the 3.5.2 version.
The version included in Ubuntu is usually a bit behind the official release, due to the way that Ubuntu updating works and they focus on robustness instead of newness.
If you want the very latest version, you must download it yourself, unpack it and run the eclipse binary.