Don't install distfiles directly (they might have their file flags set on BSD systems). Don't make the wrapper script more complicated than necessary. Call the correct Java VM.