Method and system for loading java class on virtual machine of android system

A java-like, virtual machine technology, applied in the field of network communication, can solve problems such as delays in the Android system, achieve the effect of improving execution efficiency and shortening the initial startup time

Inactive Publication Date: 2013-12-25
ZHEJIANG UNIV CITY COLLEGE
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The present invention provides a method and a system for loading java classes on a virtual machine of the android system, and solves the delay problem of starting the Android system caused by the loading and linking of the Java classes initially started by the virtual machine of the android system

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for loading java class on virtual machine of android system
  • Method and system for loading java class on virtual machine of android system
  • Method and system for loading java class on virtual machine of android system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0059] Embodiment one, Figure 4 It is a configuration diagram of a mobile terminal with a virtual machine in an embodiment of the present invention, a machine (such as an Android mobile terminal (300)) configured with a Dalvik VM (310), and its Dalvik VM includes a Java class loader (320) and a memory Management module (330). The Java classes created by the external Java class generator are stored in module 350 .

[0060] The Java classes in the module 350 are created by the external Java class generator (100). According to the needs of the initial startup program, one or more Java classes are pre-selected to be loaded and linked, and information is extracted during this process. These information form The basic structure of the Java class to be established, and the Java class is established based on this structure.

[0061] In this embodiment, the external Java class generator (100) extracts the information structure from one or more Java classes that need to be loaded. Wh...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method and a system for loading java class on a virtual machine of an android system. The method comprises the following steps that an external java class generator of the android system pre-loads and links required java class, and structural information corresponding to the java class is obtained; the external java class generator looks up the loading situation of the structural information in the virtual machine of the android system according to the structural information, if the structural information is loaded in the virtual machine, the virtual machine forbids memory allocation for the structural information, and if the structural information is not loaded in the virtual machine, the virtual machine establishes a corresponding C-language source file according to the structural information; the virtual machine obtains a corresponding binary-form java class file according to the C-language source file and saving the binary-form java class file in a read-only memory area; when the android system is started initially, the virtual machine looks up the binary-form java class file and performs direct loading. The java class in the virtual machine is pre-generated and memorized in a read-only memory (ROM) for usage, the loading and linking time of the java class in the virtual machine is shortened, and the execution efficiency of android programs can be improved.

Description

technical field [0001] The invention relates to the technical field of network communication, in particular to a method and system for loading java classes on a virtual machine of an android system. Background technique [0002] At present, the Dalvik VM of the Android system of the mobile terminal loads classes into memory in the following ways: figure 1 As shown, firstly the Android system decides whether a class file is needed (S10), if necessary, loads the JAR file (S12), checks whether there is a classes.dex file in the JAR file (S14), and if it exists, decompresses the classes.dex (S16 ), check whether there is a required class file in classes.dex (S18), if there is, load it (S20), if not, return to S12, and repeat the above steps to find another JAR file. [0003] The linking process of ordinary classes in the Android system is as follows: figure 2 As shown, the loading and linking of all classes and interfaces on the Java class inheritance chain is recursive. At ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/445
Inventor 霍梅梅吴明晖蔡建平吴剑钟孙霖王云武
Owner ZHEJIANG UNIV CITY COLLEGE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products