<?php
system('java -version');
?>
system('java -version');
?>
with the error
Error occurred during initialization of VM
Could not reserve enough space for code cache.
Could not reserve enough space for code cache.
We already had the setsebool -P httpd_ssi_exec=1 option on, so that Apache had permission to execute whatever. Strangely, however, this "memory" issue is also due, somehow to selinux.
Edit: As a commenter below just indicated, you can use setsebool -P httpd_execmem=1 to disable this setting. If that doesn't work, well, back to the sledgehammer.