platform.c: tweak local Java search code a bit
platform.c: tweak local Java search code a bit

This is in preparation for some refactoring.

imagej/imagej-launcher,imagej/imagej-launcher,imagej/imagej-launcher