Thursday, July 16, 2009

OS X: fink messes with your java classpath

Recently I spent half of a night correcting the consequences of a stupid decision:
I thought it would be a good idea to install Ant with Fink...

Generally I am a big fan of the OSX package managers Fink and MacPorts. They have saved me a lot of work before.

But after last night I am very skeptical if it is really a good idea to install a java application via Fink.

I just typed fink install ant ...

...and after the installation finished, my java classpath was quite borked!
Fink added tons of jars to my classpath (specifically everything listed in /sw/share/java/classpath).

This had the effect, that Canoo Web Test was not working any more!
Reason: Fink has put an incompatible version of Rhino on my classpath ...

My first error was probably, that I installed the ant package and not ant-base package. Because ant comes with a lot of java dependencies ...

Nevertheless I don't think people usually want fink to mess with their java classpath ... this has such a potential to break things ...

After finding out the reason, I spent some time with fink purge -r to get rid of all those packages that polluted my classpath... It turns out that installing stuff with fink is a lot easier than getting rid of it again ...

3 comments:

  1. got a similar mess by installing ruby/rails staff with fink.

    sudo rm -rf /sw does the tricke ;)

    ReplyDelete
  2. @bertolami
    That would have been a bit too drastic for me ... call me a wimp :-)

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...