In case this helps anyone. I'm running Jenkins locally on Windows with JDK21 and had this issue. You need to remember to open the command prompt as administrator ('Run as administrator') before starting Jenkins with a command like:
java -jar jenkins.war --httpPort=8081