Home > Back-end >  Java how to obtain permission to modify the system hosts file
Java how to obtain permission to modify the system hosts file

Time:10-18

path C: \ WINDOWS \ System32 \ drivers \ etc \ hosts
Write file code:
Files. The write (Paths. The get (hostsPath), content. getBytes (), standardOpenOption);
With new directory files can be written, hosts cannot write
  • Related