共查询到17条相似文献,搜索用时 218 毫秒
1.
2.
现如今,Java编程体系已经成为了计算机运行当中十分重要的组成部分,Java是一种能够对跨平台应用软件现象对象进行撰写的程序设计语言.在Java变成体系当中,JVM是其中的核心,而动态类加载更是其重要的特征.本文研究了Java的动态类加载机制,并分析了其动态类加载器的原理、体系结构等,希望本文的研究能够为相关工作者提供一定的参考作用. 相似文献
3.
Java 虚拟机(JVM)中的类加载机制可以在 Java 应用程序运行期间动态加载类文件, 而不影响其它功能模块的正常运行. 通过对 Java 类加载器的层次体系结构, 动态类加载机制原理、实现过程进行分析, 将Java动态类加载机制应用到高校网站管理平台的文件发布模块中, 使得设计好的静态网页和后台管理系统相关联, 通过自定义加载器来加载加密过的Java类文件. 这样以可插拔的方式快速的部署二级网站, 增强了网站管理平台的灵活性和可扩展性. 相似文献
4.
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.
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.
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.
Li Gong 《Internet Computing, IEEE》1998,2(6):56-61
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.
《Information and Software Technology》2014,56(9):1076-1085
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.
Peter J. Clarke Author Vitae Djuradj Babich Author Vitae 《Journal of Systems and Software》2008,81(12):2269-2286
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. 相似文献