Wednesday, August 16, 2006

Cannot use javahl nor command line svn client

Problem:
svnant gives this error when i try to run the example that comes with it, or anything else
Cannot use javahl nor command line svn client

Solution:
the javahl dll file needs to be on your PATH to be able to load. svntask uses a System.loadLibrary() to load this dll, so modify your PATH variable and add the dir of where that dll is at. If you get subclipse for subversion then you can find javahl in the plugins dir, i think.

You can check what your path is by doing:
System.out.println(System.getProperty("java.library.path"));
after you change your path, you may need to reboot because windows is stupid.

5 comments:

  1. thanks, very usefull post.

    ReplyDelete
  2. Hi,

    I just read your post but I cannot seem to get this to work. My Path is setup as follows:

    Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\ant\apache-ant-1.6.5\bin;D:\svnant\lib\

    The svnjavahl.jar is in D:\svnant\lib\ but it is giving me the error posted above.

    Thanks.

    ReplyDelete
  3. Scratch that, I actually read the initial post properly and pointed my path at svnjavahl.dll! Doh!

    ReplyDelete
  4. Thanks for this - for info, I found I only needed to restart Eclipse (rather than rebooting Windows) to pick up the changes to the path variable

    ReplyDelete
  5. What if I don't want to add to PATH? Can't I run the task with jars?

    ReplyDelete