设为首页 加入收藏

TOP

实例分析JVM安全体系:双亲委派、命名空间、保护域、策略(三)
2017-09-30 16:34:44 】 浏览:3990
Tags:实例分析 JVM 安全 体系 双亲 委派 命名 空间 保护 策略
bsp;      while (-1 != (ch = is.read())) {                 baos.write(ch);             }             data = baos.toByteArray();         }         catch (FileNotFoundException e) { //            e.printStackTrace();             return null;         }         catch (IOException ioe) {             ioe.printStackTrace();       }         finally {             try {                 is.close();                 baos.close();             }             catch (Exception e2) {             }         }         return data;     }     public static void main(String[] args) throws Exception {         //假定的系统加载器         MyClassLoader father = new MyClassLoader("father");         father.setPath(HOME + "syslib\\");         MyClassLoader child = new MyClassLoader(father, "child");         child.setPath(HOME + "ext\\");         MyClassLoader user = new MyClassLoader("user");         user.setPath(HOME + "usr\\");         System.out.println("-------------test parent--------------");         //测试父加载器关系         traverseParent(child);         System.out.println("-------------test load begin from child--------------");         //测试加载         test(child);         //测试命名空间         System.out.println("-------------test namespace--------------");         testNameSpace(user);     }     public static void traverseParent(ClassLoa
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 3/13/13
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇实例探索Class文件 下一篇源码分析:Java堆的创建

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目