For me it worked without any problems with this setcap command:
sudo setcap cap_net_raw,cap_net_admin=eip `realpath /usr/bin/java`
For me it worked without any problems with this setcap command:
sudo setcap cap_net_raw,cap_net_admin=eip `realpath /usr/bin/java`