Not all users running my program have read access to /etc/resolv.conf. When they don't, the entire DnsClient class fails to load.
java.lang.ExceptionInInitializerError
at github.scarsz.discordsrv.DiscordSRV.init(DiscordSRV.java:377)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "/etc/resolv.conf" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:886)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.File.exists(File.java:814)
at org.minidns.dnsserverlookup.UnixUsingEtcResolvConf.isAvailable(UnixUsingEtcResolvConf.java:98)
at org.minidns.DnsClient.addDnsServerLookupMechanism(DnsClient.java:395)
at org.minidns.DnsClient.(DnsClient.java:55)
... 2 more
Not all users running my program have read access to
/etc/resolv.conf
. When they don't, the entire DnsClient class fails to load.