make sure %{_bindir}/java points to java in jre to fix:
$ java
java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
ln -sf "%{dstdir}/bin/$filename" $RPM_BUILD_ROOT%{_bindir}
done
+ln -sf "%{jredir}/bin/java" $RPM_BUILD_ROOT%{_bindir}
+
# keep configuration in %{_sysconfdir} (not all *.properties go there)
for config in management security \
logging.properties net.properties sound.properties; do