Applies To:
[ Zend Studio for Eclipse 6.x ]
[ All operating systems ]
Overview
The SVN functionality in Java programs is available with two connectors:
- SVNKit (formerly known as JavaSVN) - is the default connector in Zend Studio for Eclipse. It is pure Java implementation of the Subversion API.
- JavaHL - uses JNI to execute operating system's native binary libraries for SVN operations.
In some cases JavaHL may be a better choice than the default SVNKit connector. This article describes how to add the JavaHL SVN connector to Zend Studio for Eclipse. The process consists of the JavaHL Eclipse plugin installation and operating system's configuration.
Instructions
Installing the Subversive JavaHL Connector Plug-In
- In Zend Studio for Eclipse, go to Help | Software Updates | Find and Install.
- In the Feature Updates dialog, select the second option Search for new features to install and click Next.
- In the Update sites to visit dialog, select the Subversive SVN connectors update site 2.0.x and click Finish (you may want to check the Automatically select mirrors checkbox before clicking Finish, in order to skip the mirror selection prompt).
- In the Search Results dialog, open the hierarchy Subversive SVN connectors update site 2.0.x | Subversive SVN Connectors.
- Mark the Native JavaHL 1.5 Implementation plugin.
- Click Next and complete the installation by accepting the defaults in the dialogs to follow.
- Restart Zend Studio for Eclipse.
- Go to Help | Software Updates | Manage configuration.
- Find the SVNKit 1.1.7 Implementation and SVNKit 1.2.1 Implementation plugins, right-click each and choose Disable.
- Restart Zend Studio for Eclipse.
Configuring JavaHL Support in Microsoft Windows
No additional steps need to be taken by Microsoft Windows users, except for step 5 in the previous section.
Configuring JavaHL Support in GNU/Linux
On a GNU/Linux system the JavaHL plug-in expects to find the libsvnjavahl-1 library. This library must be installed in the operating system and its path must be listed in JRE's 'java.library.path' parameter.
- Search you distribution's documentation for help on installing the libsvnjavahl-1 library. Examples:
- Debian (Ubuntu) users need to install the libsvn-java package ( # aptitude install libsvn-java )
- Fedora users need to install the subversion-javahl package ( # yum install subversion-javahl )
- Install the required libraries.
- To add the newly installed library to the java.library.path parameter of the JRE, choose either of the following methods:
- Follow the instructions in the Knowledge Base article "How to Change the JRE Used by Zend Studio for Eclipse", which describe how to run Zend Studio with the system's JRE. This automatically adds the system's library paths into the Java environment
OR - In Zend Studio:
- Open the Configuration Details - Help | About Zend Studio for Eclipse | Configuration Details.
- Find the java.library.path parameter and copy its value.
- Open the ZendStudio.ini file ( < Zend Studio installation directory >/ZendStudio.ini ).
- Right after the '-vmargs' parameter add -Djava.library.path=<the line copied from Zend Studio Configuration Details>:/usr/lib. Note that the path to libsvnjavahl-1 can be different for your distribution (not /usr/lib). The resulting file should look like this:
- Follow the instructions in the Knowledge Base article "How to Change the JRE Used by Zend Studio for Eclipse", which describe how to run Zend Studio with the system's JRE. This automatically adds the system's library paths into the Java environment
256m
-startup
plugins/org.zend.php.startup_1.0.0.jar
-vmargs
-Djava.library.path=/usr/local/Zend/ZendStudioForEclipse-6.1.1/jre/lib/i386/client:/usr/local/Zend/ZendStudioForEclipse-6.1.1/jre/lib/i386:/usr/lib/xulrunner-1.9.0.5:/usr/lib/xulrunner-1.9.0.5:/usr/lib/xulrunner-1.9.0.5:/usr/lib
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/local/Zend/ZendStudioForEclipse-6.1.1/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.8.1.3-20070404/xulrunner
-Xms128M
-Xmx512M
Configuring JavaHL Support in MacOS X
The process is similar to the one used for GNU/Linux:
- Install subversion-javahlbindings using MacPorts.
- In Zend Studio, open the Configuration Details - Zend Studio for Eclipse | About Zend Studio for Eclipse | Configuration Details.
- Find the java.library.path parameter and copy its value.
- Open the ZendStudio.ini file ( < Zend Studio installation directory >/ZendStudio.app/Contents/MacOS/ZendStudio.ini ).
- Right after the '-vmargs' parameter add -Djava.library.path=<the line copied from Zend Studio Configuration Details>:/opt/local/lib. The resulting file should look like this:
org.eclipse.platform
-vmargs
-Djava.library.path=.:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:/opt/local/lib
-Dorg.eclipse.swt.browser.XULRunnerPath=/Applications/Zend/Zend Studio for Eclipse - 6.1.1/plugins/org.mozilla.xulrunner.carbon.macosx_1.8.1.3-20070404/xulrunner
-Xdock:icon=../Resources/mac.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts
Result
To verify that JavaHL was installed properly:
- Start Zend Studio for Eclipse.
- Open the Preferences dialog - go to Window | Preferences, Team | SVN (on MacOS - Zend Studio for Eclipse | Preferences, Team | SVN).
- Switch to the SVN Connector tab.
- You should be able to see the Native JavaHL connector selected in the drop-down.
Now you can try performing your regular SVN operations and decide whether JavaHL is a better choice for you.
Excerpt: This article explains how to add the JavaHL SVN connector to Zend Studio for Eclipse instead of the default SVNKit connector.
Original Post Date: 2009-04-14 19:18:47
Alternative Description:
This article explains how to add the JavaHL SVN connector to Zend Studio for Eclipse instead of the default SVNKit connector.
Comments