I don’t believe Java 8 is a standard requirement for XProtect or Husky systems. If Java is installed on the server, it is more likely being used by a third-party integration, utility, or custom application rather than by XProtect itself.
Before removing Java, I recommend identifying which application installed it and whether any systems depend on it.
Note: This does not appear to be an integration development question, so I’m surprised it was redirected to this forum. That said, I hope this information helps point you in the right direction.