Make java path more generic for compatibility

Make --with-java path more generic (specific versions are symlinked to from this path), and add trailing slash for correct `find` behaviour (won't follow symlinks by default).