update JavaNew to use package root classpath entry path instead of the name

The name ends up being just the last segment of the path, so it may not
be unique.

refs #362