Hello. Please explain someone why the Java API has not yet implemented a method that allows you to set the effective user ID of the Java process.
To accomplish this simple task, you have to make some workarounds. A striking example of such workarounds is jsvc tool from the Apache commons-daemon project for Tomcat server: https://github.com/apache/commons-daemon/blob/6702852984689bc6507690113949b478dba157ef/src/native/unix/native/jsvc-unix.c#L163