SecurityManager可以通过调用Thread.currentThread().getThreadGroup()方法来获取当前线程所在的ThreadGroup。这个方法会返回一个ThreadGroup对象,表示当前线程所在的线程组。如果SecurityManager没有足够的权限来访问当前线程的线程组,那么这个方法会抛出SecurityException异常。

SecurityManager如何获取ThreadGroup

原文地址: http://www.cveoy.top/t/topic/f5WD 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录