首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到17条相似文献,搜索用时 109 毫秒
1.
随着科学技术的快速发展,各种软件也在不断研发和完善当中,Java动态类加载机制就是在这种条件下产生的,因为其具备显著的优势,所以得到了广泛应用。Java动态类加载机制相对于其他同类型的技术来说能够最大程度减少对内存空间的占用量,而且可以随时下载所需要用到的功能,不会影响其他功能的使用。所以,加大对Java动态类加载机制的研究力度,使其应用到更多领域中成为当前相关研究人员最为重视的工作内容。为此笔者主要介绍了Java动态类加载机制的相关内容,希望能够使更多人进一步了解Java动态类加载机制。  相似文献   

2.
现如今,Java编程体系已经成为了计算机运行当中十分重要的组成部分,Java是一种能够对跨平台应用软件现象对象进行撰写的程序设计语言.在Java变成体系当中,JVM是其中的核心,而动态类加载更是其重要的特征.本文研究了Java的动态类加载机制,并分析了其动态类加载器的原理、体系结构等,希望本文的研究能够为相关工作者提供一定的参考作用.  相似文献   

3.
Java 虚拟机(JVM)中的类加载机制可以在 Java 应用程序运行期间动态加载类文件, 而不影响其它功能模块的正常运行. 通过对 Java 类加载器的层次体系结构, 动态类加载机制原理、实现过程进行分析, 将Java动态类加载机制应用到高校网站管理平台的文件发布模块中, 使得设计好的静态网页和后台管理系统相关联, 通过自定义加载器来加载加密过的Java类文件. 这样以可插拔的方式快速的部署二级网站, 增强了网站管理平台的灵活性和可扩展性.  相似文献   

4.
Java类加载器机制与模型   总被引:1,自引:0,他引:1  
主要讨论Java类加载器,类加载器是Java运行环境的一部分,它可以动态地把类加载到Java虚拟机中,而在通常情况下,类仅在被需要的时候加载。正是有了类加载器机制,Java虚拟机无需了解类文件的结构和类文件系统。在类加载器的选择中,Java使用了双亲委派模型来处理由谁来加载类。  相似文献   

5.
通过对Java应用程序的执行过程和Java类加载器的加载机制的分析,探讨了如何在Java类的显示加载和通过自定义类加载器进行加载两种方式下,让一个Java应用程序通过动态加载并执行另一个Java应用程序的具体过程,并对之进行了深入的讨论。  相似文献   

6.
Java动态类加载机制研究及应用   总被引:2,自引:0,他引:2  
为了在Java应用程序运行期间动态加载类文件,而不影响其它功能模块的正常运行,在Java虚拟机(JVM)机制上给出了Java动态类加载的实现方法。通过对Java类加载器的体系结构,动态类加载机制原理、实现过程和实现方法的分析,在网络教学环境下实现了一个基于C/S结构模式的动态的从数据库中获取Java源代码并编译运行的学生实验教学系统,并结合反射机制为Java作为动态语言提出一种应用的途径,充分展现了Java语言的灵活性、安全性,使它在代码安全保护和网络环境下有广阔应用前景。  相似文献   

7.
Java动态类加载机制及其应用   总被引:10,自引:1,他引:10  
Java动态类加载机制是Java虚拟机(JVM)的一个重要特征。它实现了在程序执行的过程中动态地加载所需要的类文件,并且这种动态行为是可以人为控制的。这使得Java语言平台具有在运行期间安装软件组件的能力。通过对Java类加载器的原码进行分析,阐述了Java动态类加载机制的原理和过程,并通过一个客户端服务器(C/S)模式下动态地更新客户端软件功能的例子,说明了Java动态类加载机制的实际应用。  相似文献   

8.
本文分析了大规模分布式系统升级中存在的问题,给出了一种通用性的系统模型,并对模型中的基于BT的文件共享、系统的类动态加载、Java系统更新等关键技术进行了分析,最后总结了该模型的特点。  相似文献   

9.
朱跃龙  韦敏  冯钧 《计算机工程》2006,32(22):96-98
将反射技术引入水利数据库应用系统,实现对底层数据库变化的自适应,动态加载应用类,实现功能可扩充性,提高系统容错性。基于Java Reflection设计开发了洪水预报子系统的原型。  相似文献   

10.
在编写Java程序时,数组是常用的一种数据类型,然而在实际使用时有许多不便之处.为此,文章讨论了代替Java传统数组的动态数组的设计及实现过程,并举例说明了动态数组类的使用方法.  相似文献   

11.
In Java software, one important flexibility mechanism is dynamic class loading. Unfortunately, the vast majority of static analyses for Java treat dynamic class loading either unsoundly or too conservatively. We present a novel semi-static approach for resolving dynamic class loading by combining static string analysis with dynamically gathered information about the execution environment. The insight behind the approach is that dynamic class loading often depends on characteristics of the environment that are encoded in various environment variables. Such variables are not static elements; however, their run-time values typically remain the same across multiple executions of the application. Thus, the string values reported by our technique are tailored to the current installation of the system under analysis. Additionally, we propose extensions of string analysis to increase the number of sites that can be resolved purely statically, and to track the names of environment variables. An experimental evaluation on the Java 1.4 standard libraries shows that a state-of-the-art purely static approach resolves only 28% of non-trivial sites, while our approach resolves 74% of such sites. We also demonstrate how the information gained from resolved dynamic class loading can be used to determine the classes that can potentially be instantiated through the use of reflection. Our extensions of string analysis greatly increase the number of resolvable reflective instantiation sites. This work is a step towards making static analysis tools better equipped to handle the dynamic features of Java. This material is based upon work supported by the National Science Foundation under CAREER grant CCF-0546040.  相似文献   

12.
Java虚拟机动态类加载的形式化模型   总被引:1,自引:0,他引:1  
Java虚拟机支持一种功能很强的动态加戡类的机制.它具有惰性加戡、类型安全连接、用户自定义加戡策略、以及劝态名字空间等特性。但是,在Java的早期实现(JDK1.0和1.1)中,这种机制包含了一种称为类型欺骗的严重设计错误.尽管JDK1.2通过引入一种类加戡约束策略修正了这个错误,但是由动态加戡引起的其它形式的类型欺骗仍然存在于JDK1.2和1.3中。本文详细讨论了与动态类加戡相关的类型欺骗问题,提出了一个严格定义Java虚拟机操作语义和静态语义的形式化模型。其中,操作语义描述了类加戡约束策略、字段及方法解析算法等类加戡的主要特性;静态语义采用类型规修正了JDK1.2和1.3中的类型欺骗。  相似文献   

13.
张仕  赖会霞  黄林鹏 《计算机科学》2008,35(11):284-289
针对软件单个类的动态更新操作存在许多限制,例如不允许删除类、方法等,提出类动态更新事务的方法,利用动态更新类集来克服这些限制,同时保证更新的安全性。基于此,对动态更新事务的一些属性,如ACID进行讨论,提出类型安全的类动态更新事务并进行了证明。最后,以Java语言为例,说明了如何构造动态更新程序,并进行了相应的实验,说明了方法的可行性。  相似文献   

14.
Dynamic software updating is critical for many systems that must provide continuous service. In addition, the Java language is gaining increasing popularity in developing distributed systems. Most previous works on updating are concerned with safely updating one class every time. It has many limitations on updating classes, such as not allowing deleting methods invoked in other classes. In this paper, the update transaction is purposed to dynamically update the class set, and some of its properties are discussed, such as atomicity, consistency, isolation, and durability (ACID). Then the property of type-safety is proven formally. In order to update without changing the Java Virtual Machine (JVM) and the Java programming language, this paper proposes a new implementation method. The method makes use of the Java class loading mechanism and reflection mechanism. We also present how to design an updatable Java program and a Java updating program. At the end of the paper, an experiment is made for analysis.  相似文献   

15.
The class loading mechanism, central to Java, plays a key role in JDK 1.2 by enabling an improved security policy that is permission-based and extensible. The author concludes that JDK 1.2 has introduced a powerful and secure class loading mechanism. It not only enforces type safety and name space separation but also has a significant role in the new security architecture that supports fine grained, permission based access control. The new class loading mechanism's flexibility-through its delegation scheme and the rich set of class loader classes-gives Java applications and applets greater freedom to customize and specify how, when, and from where classes are loaded. Because the class loading mechanism is central to both the correctness and the security of the Java runtime system, we would like to model and define this mechanism, perhaps in a formal verification system. We can then obtain a formal specification and prove (or disprove) that the mechanism as currently designed is sufficient for security  相似文献   

16.
ContextThe employment of class loaders in component-based Java programs may introduce runtime type errors, which may happen at any statement related to class loading, and may be wrapped into various types of exceptions raised by JVM. Traditional static analysis approaches are inefficient to detect them.ObjectiveOur previous work proposed a semi-static detection work based on points-to analysis to detect such runtime type errors. In this paper, we extend previous work by referencing the information obtained from class loading to detect runtime type errors in component-based Java programs, without the need to running them.MethodOur approach extends the typical points-to analysis by gathering the behavior information of Java class loaders and figuring out the defining class loader of the allocation sites. By doing that, we obtain the runtime types of objects a reference variable may point to, and make use of such information to facilitate runtime type error detecting.ResultsResults on four case studies show that our approach is feasible, can effectively detect runtime errors missed by traditional static checking methods, and performs acceptably in both false negative test and scalability test.  相似文献   

17.
The transition from Java 1.4 to Java 1.5 has provided the programmer with more flexibility due to the inclusion of several new language constructs, such as parameterized types. This transition is expected to increase the number of class clusters exhibiting different combinations of class characteristics. In this paper we investigate how the number and distribution of clusters are expected to change during this transition. We present the results of an empirical study were we analyzed applications written in both Java 1.4 and 1.5. In addition, we show how the variability of the combinations of class characteristics may affect the testing of class members.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号