加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

Java 6中的原生GSS-API的Windows支持

发布时间:2020-12-14 05:25:18 所属栏目:Java 来源:网络整理
导读:从 http://java.sun.com/developer/technicalArticles/J2SE/security/#3: Note: These two system properties are ignored when applications run on operating systems that do not yet support this feature,for example,MS Windows. 那个文件是从2006年
从 http://java.sun.com/developer/technicalArticles/J2SE/security/#3:

Note: These two system properties are
ignored when applications run on
operating systems that do not yet
support this feature,for example,MS
Windows.

那个文件是从2006年开始的,所以事情可能已经改变了,但是我没有找到一个确定的答案.

我想知道Sun Java 6 for Windows的最新版本今天是否支持原生GSS(获取TGT而不修改注册表).

解决方法

从http://hg.openjdk.java.net/jdk6/jdk6-gate/jdk/file/78235ae077a1/src/share/classes/sun/security/jgss/GSSManagerImpl.java(47):

47     static {
   48         USE_NATIVE =
   49             AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
   50                     public Boolean run() {
   51                             String osname = System.getProperty("os.name");
   52                             if (osname.startsWith("SunOS") ||
   53                                 osname.startsWith("Linux")) {
   54                                 return new Boolean(System.getProperty
   55                                     (USE_NATIVE_PROP));
   56                             }
   57                             return Boolean.FALSE;
   58                     }
   59             });
   60

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读