Find tools.jar the same way for unix and mac

This is to make things work in Linux. Will it work in OS X?