Fixed path lookup to handle nested Java apps.

Tests are passing.