Etiquetas

sábado, 20 de agosto de 2011

Installing Eclipse with Subversion for PHP and Javascript Development on Mac OS X

Installing Eclipse with Subversion for PHP and Javascript Development on Mac OS X



Installing Eclipse with Subversion for PHP and Javascript Development on Mac OS X


10:24 pm

Mac OS X

Mac OS X 10.6 Snow Leopard comes with the 64bit version of Java 1.6 installed by default. Unfortunately, Eclipse 32bit and older subeclipse plugins are not 100% compatible with the 64bit version of Java 1.6. You may encounter errors when using Eclipse such as “Unable to load default SVN client” (which can be solved by installing JavaHL), and an unknown exception when creating a “project from svn” (you’ll need Eclipse 64bit to fix this). The best, simplest solution is to get the latest version of Eclipse Cocoa 64bit for Mac OS X, codenamed Galileo.

Installing JavaHL Library (Pre-requiste for Subclipse)

In order for subclipse to work on your Mac OS X machine, you will need to download and install the JavaHL which provides a JNI binding layer from Java to the subversion binaries. The quickest way is to just install the latest subversion binaries, which includes the JavaHL library.

  1. Double-check what is installed on your Mac OS X by opening a Terminal and running the following:

    java -version
    svn --version
    ls /Library/Java/Extensions
    

    The last should show a symbolic link to the JavaHL library if you have a version installed.

  2. To install the latest subversion and JavaHL, go to Collabnet Website.
  3. Select the appropriate subversion binaries for your Mac OS X version; currently “Subversion 1.6.9 Universal”.
  4. You can leave the contact info form blank and just hit the Submit button to download the .dmg image (ex: Subversion-1.6.9-10.6.x.dmg)
  5. Check that the /opt directory (which is a symbolic link to “/private/opt”) exists. If not, you can create it by running this command:

    sudo ln -s /private/opt /opt
    
  6. Launch the .dmg image and double-click on the subversion icon to install the binaries into the default “/opt/subversion” directory.
  7. Once installed, you will need to prepend “/opt/subversion/bin” to your PATH environment variable. Open up your bash environment profile “~/.profile” and add this line:

    export PATH=/opt/subversion/bin:$PATH
    

    Note that the path separator is a colon, not a semi-colon (used by Windows).

  8. Double-check that the JavaHL library is accessible. You should find a symbolic link (ex: “libsvnjavahl-1.jnilib”) for the JavaHL library in the “/Library/Java/Extensions” directory. This is the global location that the Mac OS X JVM will look for when loading libraries via JNI.


No hay comentarios:

Publicar un comentario