CN110262818A - The hot update method of Java code, device, electronic equipment and storage medium - Google Patents

The hot update method of Java code, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110262818A
CN110262818A CN201910455888.0A CN201910455888A CN110262818A CN 110262818 A CN110262818 A CN 110262818A CN 201910455888 A CN201910455888 A CN 201910455888A CN 110262818 A CN110262818 A CN 110262818A
Authority
CN
China
Prior art keywords
application program
target class
class file
java code
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910455888.0A
Other languages
Chinese (zh)
Inventor
刘正阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910455888.0A priority Critical patent/CN110262818A/en
Publication of CN110262818A publication Critical patent/CN110262818A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure is about a kind of hot update method of Java code, device, electronic equipment and storage medium.The hot update method of Java code includes: to receive at least one target class the file information of the application program of operating status, wherein, the target class the file information includes: the unique identification of Java code compiling the target class file generated and the application program of the application program;According to the unique identification, connection is established with the process of the application program;And according at least one described target class the file information, call redefineclasses interface, at least one described target class file is replaced at least one corresponding original class file respectively, to realize that the Java code heat of the application program updates.The hot update method of the Java code can execute the .class file that modified Java code is obtained by compiling in jvm without restarting corresponding application program, shorten the time-consuming of Java code update, improve the update efficiency of Java code.

Description

The hot update method of Java code, device, electronic equipment and storage medium
Technical field
This disclosure relates to software technology field more particularly to the hot update method of Java code, device, electronic equipment and storage Medium.
Background technique
In the development process of java application, in order to constantly improve the function of java application, developer's warp Often need repeatedly to modify Java code.In the related technology, it when modifying to the method in java class, needs again Start relevant application program to realize the update of Java code, for example, building in tomcat container to each application program An individual classLoader (Classloader) is stood to load the class file of the application program.When the class of some application program When file updates, all loading classes of original classLoader load are destroyed first, then create one ClassLoader loads updated class file.It is complex and time-consuming to restart relevant application program operating process, It reduce the update efficiency of Java code.Meanwhile when modifying to the method in java class, need to recompilate modification Whole Java codes of related application afterwards, and then updated Java code is executed in jvm (Java Virtual Machine).Frequently The whole Java codes for recompilating modified related application numerously increase memory requirements, occupy more multi -CPU money Source, This further reduces the update efficiency of Java code.
Summary of the invention
The disclosure provides a kind of hot update method of Java code, device, electronic equipment and storage medium, at least to solve phase Need to restart relevant application program in the technology of pass to realize that the update of Java code leads to the update efficiency of Java code Low problem.The technical solution of the disclosure is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of hot update method of Java code is provided, comprising:
Receive at least one target class the file information of the application program of operating status, wherein the target class file letter Breath includes: the unique identification of Java code compiling the target class file generated and the application program of the application program;
According to the unique identification, connection is established with the process of the application program;
According at least one described target class the file information, call redefineclasses interface, will it is described at least one Target class file replaces at least one corresponding original class file respectively, to realize the Java code heat of the application program more Newly.
Optionally, before at least one target class the file information of the application program for receiving operating status, comprising:
The Java code for modifying the application program obtains the transfer portion of the Java code;
The transfer portion for compiling the Java code obtains at least one described target class file.
Optionally, the unique identification includes: the process ID of the application program,
It is then described according to the unique identification, connection is established with the process of the application program, comprising:
According to the process ID of the application program, the corresponding service processes of the application program are obtained;
Service processes corresponding with the application program establish connection.
Optionally, after at least one target class the file information of the application program for receiving operating status, comprising:
Obtain the filename of at least one target class file;
Store at least one described target class file;And
The store path of at least one target class file and the filename are combined into parameter.
Optionally, described at least one target class the file information according to calls redefineclasses interface, will At least one described target class file replaces at least one corresponding original class file respectively, to realize the application program Java code heat updates, comprising:
The parameter of at least one target class file is transmitted to the process of the application program;
By the Parameter analysis of electrochemical of at least one target class file at the file of at least one target class file Name and store path;
The content of at least one target class file is read according to the store path of at least one target class file; And
From all class files that virtual machine has loaded, at least one of the same name at least one described target class file is searched A original class file.
Optionally, described at least one target class the file information according to calls redefineclasses interface, will At least one described target class file replaces at least one corresponding original class file respectively, to realize the application program Java code heat updates, further includes:
Redefineclasses interface is called, at least one described target class file is replaced corresponding at least one respectively A original class file reloads and executes at least one described target class file, to realize that Java code heat updates.
Optionally, after the Java code heat of the application program updates, if the function of the application program is not perfect, By further modifying the Java code of the application program, the further heat of the Java code of the application program is realized more Newly.
According to the second aspect of an embodiment of the present disclosure, a kind of hot updating device of Java code is provided, comprising:
Receiving unit is configured as executing at least one the target class the file information for the application program for receiving operating status, Wherein, the target class the file information includes: the target class file and described that generates of Java code compiling of the application program The unique identification of application program;
Connection unit is configured as executing establishing connection with the process of the application program according to the unique identification;
Hot updating unit is configured as executing according at least one described target class the file information, call At least one described target class file is replaced at least one corresponding original class file by redefineclasses interface respectively, To realize that the Java code heat of the application program updates.
Optionally, the hot updating device of the Java code, further includes:
Unit is modified, is configured as executing the Java code for modifying the application program, obtains changing for the Java code Dynamic part, compiles the transfer portion of the Java code, obtains at least one described target class file.
Optionally, the unique identification includes: the process ID of the application program,
It is then described according to the unique identification, connection is established with the process of the application program, comprising:
According to the process ID of the application program, the corresponding service processes of the application program are obtained;
Service processes corresponding with the application program establish connection.
Optionally, the hot updating device of the Java code, further includes:
Storage unit is configured as executing the filename for obtaining at least one target class file, and storage is described at least One target class file;
Assembled unit is configured as executing the store path of at least one target class file and the filename group Synthetic parameters.
Optionally, described at least one target class the file information according to calls redefineclasses interface, will At least one described target class file replaces at least one corresponding original class file respectively, to realize the application program Java code heat updates, comprising:
The parameter of at least one target class file is transmitted to the process of the application program;
By the Parameter analysis of electrochemical of at least one target class file at the file of at least one target class file Name and store path;
The content of at least one target class file is read according to the store path of at least one target class file; And
From all class files that virtual machine has loaded, at least one of the same name at least one described target class file is searched A original class file.
Optionally, described at least one target class the file information according to calls redefineclasses interface, will At least one described target class file replaces at least one corresponding original class file respectively, to realize the application program Java code heat updates, further includes:
Redefineclasses interface is called, at least one described target class file is replaced corresponding at least one respectively A original class file reloads and executes at least one described target class file, to realize that Java code heat updates.
Optionally, after the Java code heat of the application program updates, if the function of the application program is not perfect, By further modifying the Java code of the application program, the further heat of the Java code of the application program is realized more Newly.
According to the third aspect of an embodiment of the present disclosure, a kind of electronic equipment is provided, comprising:
Processor;
For storing the memory of the processor-executable instruction;
Wherein, the processor is configured to described instruction is executed, to realize Java code heat as described above update side Method.
According to a fourth aspect of embodiments of the present disclosure, a kind of storage medium is provided, when the instruction in the storage medium by When the processor of electronic equipment executes, so that the electronic equipment is able to carry out the hot update method of Java code as described above.
According to a fifth aspect of the embodiments of the present disclosure, a kind of computer program product, including computer program product are provided, The computer program includes program instruction, when described program is instructed by mobile terminal execution, makes the mobile terminal execution The step of above-mentioned Java code hot update method.
The technical scheme provided by this disclosed embodiment at least bring it is following the utility model has the advantages that
1) redefineclasses interface is called by agency service program agent, by least one target class file point At least one corresponding original class file is not replaced.One is obtained in the broker program of agency service program agent Instrumentation example, by the example by least one primitive class text before at least one original class file load Part replaces at least one corresponding target class file to change the byte of the .class file of at least one original class file Code reloads at least one target class file after the bytecode of .class file changes.Reload this at least one At least one target class file is executed after target class file, in jvm to realize that Java code heat updates.Java code modification Afterwards, it can execute what modified Java code was obtained by compiling in jvm without restarting corresponding application program .class file, it is seen that the final implementation effect of modified code shortens the time-consuming of Java code update, improves Java The update efficiency of code;
2) in Java code renewal process, without restarting corresponding application program, thus during code update, phase The application program answered realizes online updating, can continue to provide external service, to improve the corresponding application of Java code The service quality and user experience of program;
3) in the hot update method of the Java code, target class file is the Java code that developer modifies application program Afterwards, the transfer portion of Java code is recompilated into generation.When modifying to Java code, it is only necessary to recompilate phase The Java code transfer portion for closing application program, reduces the compiling calculation amount of Java code, thereby reduces memory requirements, account for With less cpu resource, which further improves the update efficiency of Java code.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure, do not constitute the improper restriction to the disclosure.
Fig. 1 is the flow chart of the hot update method of Java code shown according to an exemplary embodiment;
Fig. 2 is the application scenario diagram of the hot update method of Java code shown according to an exemplary embodiment;
Fig. 3 is the flow chart of the hot update method of Java code shown according to an exemplary embodiment;
Fig. 4 is the hot updating device block diagram of Java code shown according to an exemplary embodiment;
Fig. 5 is the hot updating device block diagram of Java code shown according to an exemplary embodiment;
Fig. 6 is a kind of block diagram of device for executing the hot update method of Java code shown according to an exemplary embodiment;
Fig. 7 is a kind of block diagram of device for executing the hot update method of Java code shown according to an exemplary embodiment.
Specific embodiment
In order to make ordinary people in the field more fully understand the technical solution of the disclosure, below in conjunction with attached drawing, to this public affairs The technical solution opened in embodiment is clearly and completely described.
It should be noted that the specification and claims of the disclosure and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to embodiment of the disclosure described herein can in addition to illustrating herein or Sequence other than those of description is implemented.Embodiment described in following exemplary embodiment does not represent and disclosure phase Consistent all embodiments.On the contrary, they are only and as detailed in the attached claim, the disclosure some aspects The example of consistent device and method.
In the development process of java application, developer needs to recompilate code simultaneously after modifying code every time It is encapsulated as application program, then restarts application program, can just see the final implementation effect of modified code.It is certain to answer After routine recompilation, restarting needs the long period, for example, the web layer exploitation etc. of web application can not be divided into module The application program of exploitation.For such application program, though every time modify minimal amount of code require recompilate encapsulation it is whole A application program, also, restart web application server.
In the exploitation of enterprise-level, common application program is usually modified, from modification code to closing and restart web Server, this process need about 5 minutes time-consuming.For biggish application program, this process may need about 10 points time-consuming Clock or more time.However, developer needs periodically to check the operation result of current code simultaneously during programming It revises accordingly, to guarantee that corresponding effect is presented according to the wish of developer in code.Therefore, it is necessary to constantly close to lay equal stress on New starting web server, this greatly promotes the time of code compilation and re-launching applications.In addition, being serviced for large size Property application program for, during code update, generally require recompilate code and restart application program, restarting During service, need to interrupt external service, to influence the service quality of corresponding application programs.
For this purpose, the present invention provides a kind of hot update method of Java code, Fig. 1 is shown according to an exemplary embodiment The flow chart of the hot update method of Java code.
In step s 110, at least one target class the file information of the application program of operating status is received, wherein described Target class the file information includes: the target class file and the application program that the Java code compiling of the application program generates Unique identification.
In this step, at least one target class the file information of application program in operating status is received, wherein should Target class the file information includes: unique mark of Java code compiling the target class file generated and application program of application program Know.The unique identification of application program is used to the service processes of the corresponding application program of unique identification.Goal class file can Be developer modify application program Java code after, by whole Java codes recompilate generate.
Preferably, after target class file can also be the Java code that developer modifies application program, by Java code Transfer portion recompilate generate.
Specifically, firstly, developer searches the Java code for needing to modify function.Then, the Java code is modified.By It is based on jvm in java applications all at present to run on the server, so developer also needs Java code Transfer portion be compiled as the format that jvm can be identified, i.e. .class file.
Different from ordinary procedure .class file is not the executable program of local server.When needing to run .class when file, jvm should be run first, then .class file is loaded into jvm again and is run, and be responsible for load in jvm .class the tool of file is called classLoader, and the interface that jvm is used during loading is known as jvmti interface.
In addition, receiving at least one target class the file information of the application program of operating status.It is understood that receiving At least one target class the file information can come from an application program, for an application program A, if using journey The Java code of sequence A has many places modification, then this many places Java code transfer portion of application program A can be compiled as a mesh Class file is marked, this many places Java code transfer portion of application program A can also be compiled as multiple target class files.
Optionally, the multiple target class the file informations for receiving multiple application programs of operating status, for application program B and It, can be respectively by this many places of application program B if the Java code of application program B and C have many places modification respectively for C Java code transfer portion is compiled as a target class file, can also respectively change this many places Java code of application program B Dynamic partial compilation is multiple target class files;This many places Java code transfer portion of application program C can be compiled as one This many places Java code transfer portion of application program C can also be compiled as multiple target class files by target class file.
It is understood that the transfer portion of the Java code of the number of application program and each application program is compiled into Target class file number can be arbitrary value, should not to the embodiment of the present disclosure constitute any restrictions.
In the step s 120, according to the unique identification, connection is established with the process of the application program.
In this step, according to the unique identification of application program, connection is established with the process of corresponding application program.
The unique identification of each application program includes: the process ID of application program, then according to the unique identification of application program, Connection is established with the process of corresponding application program, comprising: according to the process ID of application program, it is corresponding to obtain the application program Service processes.Service processes corresponding with the application program establish connection.
VirtualMachine class in the com.sun.tools.attach packet of Java allows by attach method The pid (process id) of an incoming jvm, be connected remotely on jvm, for example, by the corresponding application program of target class file into Journey ID is passed to attach method, where being connected remotely to corresponding application program on the jvm of server.It can pass through LoadAgent method registers an agency service program agent to jvm, and one can be obtained in the broker program of the agent Instrumentation example, the example can change the bytecode of .class file before .class file loads, can be with It is reloaded after the bytecode of .class file changes.When calling the method for Instrumentation example, attach, The methods of loadAgent will use the method provided in ClassFileTransformer interface and be handled.
In step s 130, according at least one described target class the file information, redefineclasses interface is called, At least one described target class file is replaced at least one corresponding original class file respectively, to realize the application program Java code heat updates.
In this step, according at least one target class the file information, redefineclasses interface is called, using extremely A few target class file replaces at least one corresponding original class file respectively, to realize at least one target class file pair The Java code heat for the application program answered updates.
Specifically, the storage information according at least one target class file in test machine local is called At least one target class file is replaced at least one corresponding original class file by redefineclasses interface respectively.In generation Manage service routine agent broker program in obtain an Instrumentation example, by the example at this at least one The bytecode for changing .class file before original class file load reloads at least after the bytecode of .class file changes One target class file will at least one original class file replace at least one corresponding target class file.It reloads At least one target class file is executed after at least one target class file, in jvm to realize that Java code heat updates.
In embodiment of the disclosure, redefineclasses interface is called by agency service program agent, it is near A few target class file replaces at least one corresponding original class file respectively.Journey is acted on behalf of in agency service program agent An Instrumentation example is obtained in sequence, by the example before at least one original class file load by this at least One original class file replaces at least one corresponding target class file to change at least one original class file .class the bytecode of file reloads at least one target class file after the bytecode of .class file changes.Weight At least one target class file is executed in jvm after newly loading at least one target class file, to realize Java code heat more Newly.After Java code modification, modified Java code process can be executed in jvm without restarting corresponding application program Compiling obtained .class file, it is seen that the final implementation effect of modified code shortens the time-consuming of Java code update, Improve the update efficiency of Java code.Meanwhile in Java code renewal process, without restarting corresponding application program, because And during code update, corresponding application program realizes online updating, can continue to provide external service, to improve The service quality and user experience of the corresponding application program of Java code.
Preferably, target class file be developer modify application program Java code after, by the change of Java code Recompilate generation in part.When modifying to Java code, it is only necessary to recompilate the Java generation of related application Code transfer portion, reduces the compiling calculation amount of Java code, thereby reduces memory requirements, occupy less cpu resource, this Further improve the update efficiency of Java code.
Code tester is reproduction application failure, positioning failure root, and finally solves the failure problems of application program Process.When testing an item code, when single step goes to erroneous point, need to modify code, the code of modification may be Various types.If it is intended to code after test modifications is to check the implementation effect of application program after code revision, phase Scheme in the technology of pass is re-launching applications, and then single step goes to a test site again, this can consume many times, Increase many duplicate operating procedures, so that the development efficiency of application program reduces.So being realized during code tester The heat of code, which updates, to be of great significance.
Fig. 2 is the application scenario diagram of the hot update method of Java code shown according to an exemplary embodiment.Developer The Java code of application program is modified in locally exploitation machine 210, the transfer portion of Java code is recompilated the jvm generated can With the .class file of identification.The .class file synchronization that compiling is generated is to test machine with the Java code of test application program Whether according to the wish of developer corresponding effect is showed after modified.Test machine includes: test machine agency 220 and test Machine service 230.During code tester, application program is in test machine continuous service.It can shift to an earlier date and pass through in test machine LoadAgent method registers an agency service program agent to the jvm of test machine.Developer passes through agency service program Agent realizes that the remote thermal of the application program run on a testing machine updates.
Fig. 3 is the flow chart of the hot update method of Java code shown according to an exemplary embodiment.
Below with reference to code tester application scenarios shown in Fig. 2, Java code heat shown in Fig. 3 update side is described in detail Method.
Specific steps include:
In step S301, the multiple application program to be tested is run in test machine.
In this step, the multiple application programs to be tested in 230 operation of test machine service.For example, in test machine service Application program D, application program E and application program F are run on 230.
In step s 201, the process ID that the multiple application program is run on a testing machine is obtained.
In this step, the process ID that multiple application programs are run on a testing machine is obtained.It is taken for example, obtaining in test machine The process ID 3 of the process ID 1 of application program D, the process ID 2 of application program E and application program F that are run in business 230.
In step s101, the Java code of the multiple application program of operating status is respectively modified, obtains described more The transfer portion of the Java code of a application program.
In step s 102, the transfer portion for compiling the Java code of the multiple application program respectively obtains described more A target class file.
In step s 103, the multiple target class file is uploaded.
In step S101- step S103, developer is respectively modified in local exploitation machine 210 and runs on a testing machine The Java code of multiple application programs, for example, the method body of modification Java code, by the Java code of multiple application programs Transfer portion recompilates the multiple target class files for generating the .class file format that jvm can be identified respectively.
The multiple target class files and step of generation will be compiled in multiple target class the file informations, that is, step S101- step S103 The process ID of the corresponding multiple application programs obtained in rapid S201 is synchronized to test machine to test multiple application programs respectively Whether according to the wish of developer corresponding effect is showed after Java code is modified.
For example, application program D, application program E and application program F is respectively modified in local exploitation machine 210 in developer Java code.And the transfer portion for compiling the Java code of application program D, application program E and application program F respectively, obtains Multiple target class text of multiple target class files of application program D, multiple target class files of application program E and application program F Part.By the multiple target class files and process ID 1 of application program D, multiple target class files of application program E and process ID 2 with And the multiple target class files and process ID 3 of application program F upload to test machine by web page or quick plug-in unit respectively Test machine agency 220.
In step S202, the class name of the multiple target class file is obtained.
In step S203, the multiple target class file is stored.
In step S204, the class name of the multiple target class file and store path are combined into parameter.
In step S202- step S204, after receiving multiple target class the file informations, test machine agency 220 is obtained The class name of this multiple target class file and store path are combined into parameter by the class name of multiple target class files.
For example, using ASM frame, (java bytecode is grasped after being respectively received three target class files of application program D Vertical frame) under classReader class parse the .class files of these three target class files, obtain these three target class text The content of part.The class name of these three target class files is obtained by className class.These three the target class files that will acquire After class name is converted to the class name that jvm can be identified, stored using these three class files of class star after conversion.For example, will apply The target class file 1 of program D, the class name " a1/b1/c1 " of target class file 2 and target class file 3, " a2/b2/c2 " and " a3/ B3/c3 " is converted to " a1.b1.c1 ", " a2.b2.c2 " and " a3.b3.c3 ".Respectively using class name " a1.b1.c1 ", " a2.b2.c2 " and " a3.b3.c3 " deposits the target class file 1, target class file 2 and target class file 3 of application program D respectively Storage is in store path 1, store path 2 and store path 3.
Class name " a1.b1.c1 " and store path 1 are combined into the parameter agentArgs1 of target class file 1, by class name " a2.b2.c2 " and store path 2 are combined into the parameter agentArgs2 of target class file 2, by class name " a3.b3.c3 " and storage Path 3 is combined into the parameter agentArgs3 of target class file 3.
In step S205, according to the process ID of the multiple application program, respectively with the multiple application program into Cheng Jianli connection.
In this step, test machine agency 220 respectively obtains multiple application programs according to the process ID of multiple application programs Corresponding service processes.For example, being passed through according to the process ID of application program D, application program E and application program F FindProcess method searches all process lists of the jvm run on test machine, finds application program D, application program The specific process of E and application program F.
Service processes corresponding with multiple application programs establish connection respectively.For example, for application program D, application program E With application program F, agency service program 220 is by being passed to process ID 1 to VirtualMachine.attach method, with operation Connection is established in the specific process of the application program D of jvm;Agency service program 220 is by giving VirtualMachine.attach Method is passed to process ID 2, establishes connection with the specific process for the application program E for operating in jvm;Agency service program 220 passes through It is passed to process ID 3 to VirtualMachine.attach method, establishes and connects with the specific process for the application program F for operating in jvm It connects.
In step S206, by the parameter of the multiple target class file be transmitted to the multiple application program into Journey.
In step s 302, by the Parameter analysis of electrochemical of the multiple target class file at the class name of the multiple target class file And store path.
In step S206 and step S302, by the parameter of multiple target class files be transmitted to multiple application programs into Journey.By the Parameter analysis of electrochemical of multiple target class files at the class name and store path of multiple target class files.
For example, by the parameter agentArgs1 of target class file 1, the parameter agentArgs2 of target class file 2 and target The parameter agentArgs3 of class file 3 is transmitted to the service processes of application program D, application program E and application program F respectively.
Java class is generally packaged in the compressed package of jar format.In the embodiment of the present disclosure, pass through in advance in test machine Agency service program agent can be packaged in by loadAgent method to the jvm trade mark agency service routine agent of test machine In the compressed package of jar format.The path of the compressed package of the jar format of agency service program agent is agentPath.By for Attach.loadAgent method uploads parameter agentArgs1 and agentPath, the target class file of target class file 1 respectively 2 parameter agentArgs2 and agentPath and the parameter agentArgs3 and agentPath of target class file 3, respectively To target class file 1, the class name of target class file 2 and target class file 3.Target class file 1, mesh are obtained by Paths.get Mark the store path of class file 2 and target class file 3.
In step S303, the multiple target class file is read according to the store path of the multiple target class file Content.
In step s 304, it from all class files that virtual machine has loaded, searches same with the multiple target class file Multiple original class files of name.
In step S303 and step S304, multiple target class text is read according to the store path of multiple target class files The content of part.From all class files that virtual machine has loaded, search and multiple target class files class object of the same name.
For example, reading the content of multiple target class file according to the store path of multiple target class files.
It is traversed in the jvm run on test machine and has been loaded by instrumentation.getAllLoadedClasses .class file (the .class file loaded can store in the buffer), find the file with multiple target class file The original class file of the identical class object of name, that is, to be replaced.
In step S305, redefineclasses interface is called respectively, multiple target class files are replaced respectively Corresponding multiple original class files, to realize that the Java code heat of the multiple application program updates respectively.
In this step, redefineclasses interface is called in test machine service 230 respectively, respectively applies each At least one target class file of program replaces at least one corresponding original class file respectively.
For example, calling redefineclasses interface respectively, obtained in the broker program of agency service program agent One Instrumentation example, through the example before at least one original class file load of each application program By this, at least one original class file replaces at least one corresponding target class file to change at least one primitive class text The bytecode of the .class file of part reloads at least one target class text after the bytecode of .class file changes Part.
For example, calling java.lang.instrument.Instrumentation class by Java agent mechanism The class that redefineClasses method completes at least one original class file of each application program redefines, and realization will be each The original class file of at least one of application program replaces at least one corresponding target class file.
Pass through classLoader respectively at least one target class file of each application program of .class file format It is loaded into the jvm run on test machine and runs, to realize that the Java code heat of corresponding application program updates.
During running in the jvm that multiple target class files are run on a testing machine, test machine test is corresponding multiple The no wish according to developer of the function of application program shows corresponding effect.By code tester, if corresponding multiple The function of application program does not show corresponding effect according to the wish of developer, then executes step S101 further with into one Step heat updates the Java code of corresponding multiple application programs.
In accordance with an embodiment of the present disclosure, when the function to multiple application programs is tested, developer opens locally The Java code of the multiple application programs of operation on a testing machine is respectively modified in hair machine 210, by the Java generation of multiple application programs The transfer portion of code recompilates the multiple target class files for generating the .class file format that jvm can be identified respectively.It will be more A target class the file information is that multiple target class files of compiling generation and the process ID of corresponding multiple application programs are synchronized to Test machine with the Java code for testing multiple application programs respectively it is modified after whether showed according to the wish of developer Corresponding effect.The transfer portion for only needing to recompilate the Java code of related application in test process, reduces Java The compiling calculation amount of code, thereby reduces memory requirements, occupies less cpu resource, which further improves Java codes Update efficiency, and then improve the development efficiency of application program.
In addition, redefineclasses interface is called in test machine service 230 respectively, at least by each application program One target class file replaces at least one corresponding original class file respectively.It is by classLoader that .class is literary respectively At least one target class file of each application program of part format, which is loaded into the jvm run on test machine, to be run, with reality The Java code heat of existing corresponding application program updates.At least one target class file of each application program is on a testing machine The no wish according to developer of function that corresponding application program is tested during running in the jvm of operation shows accordingly Effect.By code tester, if the function of corresponding multiple application programs does not show phase according to the wish of developer Effect is answered, then further executes the Java code that step S310 updates corresponding multiple application programs with further heat.It tested The redefine function that java.lang.instrument.Instrumentation class is utilized in journey, is answered accordingly without restarting It is updated with the heat that Java code can be realized in program, shortens the time-consuming of Java code update, improve the update of Java code Efficiency, and then improve the development efficiency of application program.
Fig. 4 is the hot updating device block diagram of Java code shown according to an exemplary embodiment.Include: receiving unit 410, Connection unit 420 and hot updating unit 430.
Receiving unit 410 is configured as executing at least one the target class file letter for the application program for receiving operating status Breath, wherein the target class the file information includes: the target class file and institute that the Java code compiling of the application program generates State the unique identification of application program.
Connection unit 420 is configured as executing according to the unique identification, establishes and connect with the process of the application program It connects.
Hot updating unit 430 is configured as executing according at least one described target class the file information, call At least one described target class file is replaced at least one corresponding original class file by redefineclasses interface respectively, To realize that the Java code heat of the application program updates.
In embodiment of the disclosure, the hot updating device of the Java code receives application program in operating status extremely A few target class the file information, wherein the target class the file information includes: the mesh that the Java code compiling of application program generates Mark the unique identification of class file and application program.Goal class file can be the Java that developer modifies application program After code, whole Java codes are recompilated into generation.Target class file can also be that developer modifies application program After Java code, the transfer portion of Java code is recompilated into generation.The unique identification of each application program includes: application The process ID of program, according to the process ID of application program, the corresponding service processes of the program that is applied.It is corresponding with application program Service processes establish connection.According at least one target class the file information, redefineclasses interface is called, using at least One target class file replaces at least one corresponding original class file respectively, to realize that at least one target class file is corresponding The Java code heat of application program updates.After Java code modification, hot updating unit 430 is corresponding using journey without restarting Sequence can execute modified Java code in jvm and pass through the .class file that compiling obtains, it is seen that modified code is most Whole implementation effect shortens the time-consuming of Java code update, improves the update efficiency of Java code.
Fig. 5 is the hot updating device block diagram of Java code shown according to an exemplary embodiment.Include: modification unit 510, Receiving unit 520, connection unit 530, storage unit 540, assembled unit 550 and hot updating unit 560.
Unit 510 is modified, is configured as executing the Java code for modifying the application program, obtains the Java code Transfer portion compiles the transfer portion of the Java code, obtains at least one described target class file.
Receiving unit 520 is configured as executing at least one the target class file letter for the application program for receiving operating status Breath, wherein the target class the file information includes: the target class file and institute that the Java code compiling of the application program generates State the unique identification of application program.
Connection unit 530 is configured as executing according to the unique identification, establishes and connect with the process of the application program It connects.
Optionally, the unique identification includes: the process ID of the application program, then described according to the unique identification, Connection is established with the application program, comprising:
According to the process ID of the application program, the corresponding service processes of the application program are obtained;Journey is applied with described The corresponding service processes of sequence establish connection.
Storage unit 540 is configured as executing the filename for obtaining at least one target class file, and storage is described extremely A few target class file;
Assembled unit 550 is configured as executing the store path and the file of at least one target class file Name is combined into parameter.
Hot updating unit 560 is configured as executing according at least one described target class the file information, call At least one described target class file is replaced at least one corresponding original class file by redefineclasses interface respectively, To realize that the Java code heat of the application program updates.
Optionally, the parameter of at least one target class file is transmitted to the process of the application program;It will Filename and storage road of the Parameter analysis of electrochemical of at least one target class file at least one target class file Diameter;The content of at least one target class file is read according to the store path of at least one target class file;And From all class files that virtual machine loads, at least one primitive class text of the same name at least one described target class file is searched Part.
Redefineclasses interface is called, at least one described target class file is replaced corresponding at least one respectively A original class file reloads and executes at least one described target class file, to realize that Java code heat updates.
In embodiment of the disclosure, according at least one described target class the file information, redefineclasses is called Interface replaces at least one corresponding original class file using at least one target class file, to realize at least one mesh respectively The Java code heat for marking the corresponding application program of class file updates.Corresponding application program operation when being updated to Java code heat There is no limit also there is no limit for the type externally serviced provided corresponding application program for container.No matter held using tomcat Device still can realize that the Java code heat of the embodiment of the present disclosure updates using containers such as similar jetty.
In an optional embodiment of the disclosure, after the Java code heat of the application program updates, if described The function of application program is not perfect, then by further modifying the Java code of the application program, realizes the application program Java code it is further heat update.
Fig. 6 is a kind of Java code for the hot update method of above-mentioned Java code shown according to an exemplary embodiment The block diagram of hot updating device 600.For example, the hot updating device 600 of Java code can be mobile phone, computer, digital broadcasting Terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc..
Referring to Fig. 6, device 600 may include following one or more components: processing component 610, memory 620, power supply Component 630, multimedia component 640, audio component 650, the interface 660 of input/output (I/O), sensor module 670, and Communication component 680.
The integrated operation of the usual control device 600 of processing component 610, such as with display, telephone call, data communication, phase Machine operation and record operate associated operation.Processing component 610 may include that one or more processors 690 refer to execute It enables, to perform all or part of the steps of the methods described above.In addition, processing component 610 may include one or more modules, just Interaction between processing component 610 and other assemblies.For example, processing component 610 may include multi-media module, it is more to facilitate Interaction between media component 540 and processing component 610.
Memory 620 is configured as storing various types of data to support the operation in equipment 600.These data are shown Example includes the instruction of any application or method for operating on device 600, contact data, and telephone book data disappears Breath, picture, video etc..Memory 620 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasable to compile Journey read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash Device, disk or CD.
Power supply module 630 provides electric power for the various assemblies of device 600.Power supply module 630 may include power management system System, one or more power supplys and other with for device 600 generate, manage, and distribute the associated component of electric power.
Multimedia component 640 includes the screen of one output interface of offer between described device 600 and user.One In a little embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen Curtain may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touch sensings Device is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding action Boundary, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more matchmakers Body component 640 includes a front camera and/or rear camera.When equipment 600 is in operation mode, such as screening-mode or When video mode, front camera and/or rear camera can receive external multi-medium data.Each front camera and Rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 650 is configured as output and/or input audio signal.For example, audio component 650 includes a Mike Wind (MIC), when device 600 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone is matched It is set to reception external audio signal.The received audio signal can be further stored in memory 620 or via communication set Part 680 is sent.In some embodiments, audio component 650 further includes a loudspeaker, is used for output audio signal.
I/O interface 660 provides interface between processing component 610 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, enables button and lock at volume button Determine button.
Sensor module 670 includes one or more sensors, and the state for providing various aspects for device 600 is commented Estimate.For example, sensor module 670 can detecte the state that opens/closes of equipment 600, and the relative positioning of component, for example, it is described Component is the display and keypad of device 600, and sensor module 670 can be with 600 1 components of detection device 600 or device Position change, the existence or non-existence that user contacts with device 600,600 orientation of device or acceleration/deceleration and device 600 Temperature change.Sensor module 670 may include proximity sensor, be configured to detect without any physical contact Presence of nearby objects.Sensor module 670 can also include optical sensor, such as CMOS or ccd image sensor, at As being used in application.In some embodiments, which can also include acceleration transducer, gyro sensors Device, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 680 is configured to facilitate the communication of wired or wireless way between device 600 and other equipment.Device 600 can access the wireless network based on communication standard, such as WiFi, carrier network (such as 2G, 3G, 4G or 5G) or them Combination.In one exemplary embodiment, communication component 680 is received via broadcast channel from the wide of external broadcasting management system Broadcast signal or broadcast related information.In one exemplary embodiment, the communication component 680 further includes near-field communication (NFC) Module, to promote short range communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) can be based in NFC module Technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 600 can be believed by one or more application specific integrated circuit (ASIC), number Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of storage medium including instruction, the memory for example including instruction are additionally provided 620, above-metioned instruction can be executed by the processor 690 of device 600 to complete the above method.Optionally, storage medium can be with right and wrong Provisional computer readable storage medium, for example, the non-transitorycomputer readable storage medium can be ROM, deposit at random Access to memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
In the exemplary embodiment, a kind of computer program product, including computer program product, the meter are additionally provided Calculation machine program includes program instruction, when described program is instructed by mobile terminal execution, keeps the mobile terminal execution above-mentioned The step of Java code hot update method: at least one target class the file information of the application program of operating status is received, wherein The target class the file information includes: the target class file that the Java code compiling of the application program generates and described using journey The unique identification of sequence;According to the unique identification, connection is established with the process of the application program;According at least one described mesh Mark class file information, call redefineclasses interface, by least one described target class file replace respectively it is corresponding extremely A few original class file, to realize that the Java code heat of the application program updates.
Fig. 7 is a kind of Java code for the hot update method of above-mentioned Java code shown according to an exemplary embodiment The block diagram of hot updating device 700.For example, device 700 may be provided as a server.Referring to Fig. 7, device 700 includes processing Component 710 further comprises one or more processors, and the memory resource as representated by memory 720, for depositing Storage can be by the instruction of the execution of processing component 710, such as application program.The application program stored in memory 720 may include It is one or more each correspond to one group of instruction module.In addition, processing component 710 is configured as executing instruction, To execute the hot update method of above-mentioned Java code.
Device 700 can also include the power management that a power supply module 730 is configured as executive device 700, and one has Line or radio network interface 740 are configured as device 700 being connected to network and input and output (I/O) interface 750.Dress Setting 700 can operate based on the operating system for being stored in memory 720, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.The disclosure is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (10)

1. a kind of hot update method of Java code characterized by comprising
Receive at least one target class the file information of the application program of operating status, wherein the target class the file information packet It includes: the unique identification of Java code compiling the target class file generated and the application program of the application program;
According to the unique identification, connection is established with the process of the application program;
According at least one described target class the file information, redefineclasses interface is called, it will at least one described target Class file replaces at least one corresponding original class file respectively, to realize that the Java code heat of the application program updates.
2. the hot update method of Java code according to claim 1, which is characterized in that the application for receiving operating status Before at least one target class the file information of program, comprising:
The Java code for modifying the application program obtains the transfer portion of the Java code;
The transfer portion for compiling the Java code obtains at least one described target class file.
3. the hot update method of Java code according to claim 1, which is characterized in that the unique identification includes: described The process ID of application program,
It is then described according to the unique identification, connection is established with the process of the application program, comprising:
According to the process ID of the application program, the corresponding service processes of the application program are obtained;
Service processes corresponding with the application program establish connection.
4. the hot update method of Java code according to claim 3, which is characterized in that the application for receiving operating status After at least one target class the file information of program, comprising:
Obtain the filename of at least one target class file;
Store at least one described target class file;And
The store path of at least one target class file and the filename are combined into parameter.
Preferably, described at least one target class the file information according to calls redefineclasses interface, will be described At least one target class file replaces at least one corresponding original class file respectively, to realize the Java generation of the application program Code heat updates, comprising:
The parameter of at least one target class file is transmitted to the process of the application program;
By the Parameter analysis of electrochemical of at least one target class file at least one target class file filename and Store path;
The content of at least one target class file is read according to the store path of at least one target class file;And
From all class files that virtual machine has loaded, at least one original of the same name at least one described target class file is searched Beginning class file.
Preferably, described at least one target class the file information according to calls redefineclasses interface, will be described At least one target class file replaces at least one corresponding original class file respectively, to realize the Java generation of the application program Code heat updates, further includes:
Redefineclasses interface is called, at least one described target class file is replaced at least one corresponding original respectively Beginning class file reloads and executes at least one described target class file, to realize that Java code heat updates.
Preferably, after the Java code heat of the application program updates, if the function of the application program is not perfect, pass through The Java code for further modifying the application program realizes that the further heat of the Java code of the application program updates.
5. a kind of hot updating device of Java code characterized by comprising
Receiving unit is configured as executing at least one the target class the file information for the application program for receiving operating status, wherein The target class the file information includes: the target class file that the Java code compiling of the application program generates and described using journey The unique identification of sequence;
Connection unit is configured as executing establishing connection with the process of the application program according to the unique identification;
Hot updating unit is configured as executing according at least one described target class the file information, calls redefineclasses At least one described target class file is replaced at least one corresponding original class file, to realize the application by interface respectively The Java code heat of program updates.
6. the hot updating device of Java code according to claim 5, which is characterized in that the Java code heat more new clothes It sets, further includes:
Unit is modified, is configured as executing the Java code for modifying the application program, obtains the change portion of the Java code Point, the transfer portion of the Java code is compiled, at least one described target class file is obtained.
7. the hot updating device of Java code according to claim 5, which is characterized in that the unique identification includes: described The process ID of application program,
It is then described according to the unique identification, connection is established with the process of the application program, comprising:
According to the process ID of the application program, the corresponding service processes of the application program are obtained;
Service processes corresponding with the application program establish connection.
8. the hot updating device of Java code according to claim 7, which is characterized in that the Java code heat more new clothes It sets, further includes:
Storage unit, is configured as executing the filename for obtaining at least one target class file, storage it is described at least one Target class file;
Assembled unit, is configured as executing and is combined into the store path of at least one target class file and the filename Parameter.
Preferably, described at least one target class the file information according to calls redefineclasses interface, will be described At least one target class file replaces at least one corresponding original class file respectively, to realize the Java generation of the application program Code heat updates, comprising:
The parameter of at least one target class file is transmitted to the process of the application program;
By the Parameter analysis of electrochemical of at least one target class file at least one target class file filename and Store path;
The content of at least one target class file is read according to the store path of at least one target class file;And
From all class files that virtual machine has loaded, at least one original of the same name at least one described target class file is searched Beginning class file.
Preferably, described at least one target class the file information according to calls redefineclasses interface, will be described At least one target class file replaces at least one corresponding original class file respectively, to realize the Java generation of the application program Code heat updates, further includes:
Redefineclasses interface is called, at least one described target class file is replaced at least one corresponding original respectively Beginning class file reloads and executes at least one described target class file, to realize that Java code heat updates.
Preferably, after the Java code heat of the application program updates, if the function of the application program is not perfect, pass through The Java code for further modifying the application program realizes that the further heat of the Java code of the application program updates.
9. a kind of electronic equipment characterized by comprising
Processor;
For storing the memory of the processor-executable instruction;
Wherein, according to any one of claims 1 to 4 to realize the processor is configured to executing described instruction The hot update method of Java code.
10. a kind of storage medium, when the instruction in the storage medium is executed by the processor of electronic equipment, so that the electricity Sub- equipment is able to carry out the hot update method of Java code according to any one of claims 1 to 4.
CN201910455888.0A 2019-05-29 2019-05-29 The hot update method of Java code, device, electronic equipment and storage medium Pending CN110262818A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910455888.0A CN110262818A (en) 2019-05-29 2019-05-29 The hot update method of Java code, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910455888.0A CN110262818A (en) 2019-05-29 2019-05-29 The hot update method of Java code, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110262818A true CN110262818A (en) 2019-09-20

Family

ID=67915660

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910455888.0A Pending CN110262818A (en) 2019-05-29 2019-05-29 The hot update method of Java code, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110262818A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704082A (en) * 2019-09-25 2020-01-17 许昌许继软件技术有限公司 Continuous integration method and system for monitoring platform
CN110780864A (en) * 2019-10-30 2020-02-11 网易(杭州)网络有限公司 Control method and device for class method replacement, storage medium and electronic equipment
CN111061486A (en) * 2019-12-10 2020-04-24 杭州有赞科技有限公司 Android application program increment method
CN111580813A (en) * 2020-03-25 2020-08-25 博雅信安科技(北京)有限公司 Automatic management method for Java class hot update
CN111638907A (en) * 2020-04-20 2020-09-08 北京达佳互联信息技术有限公司 Method, device, terminal and storage medium for replacing third-party code segment
CN112068875A (en) * 2020-08-04 2020-12-11 广州太平洋电脑信息咨询有限公司 System and method for realizing thread filtering strategy based on java dynamic loading
CN112199110A (en) * 2020-10-16 2021-01-08 上海睿成软件有限公司 Restart-free operation and maintenance upgrading method, system, device and medium
CN112463303A (en) * 2020-12-01 2021-03-09 中国工商银行股份有限公司 JAVA virtual machine class loading method and system
CN112596772A (en) * 2020-12-15 2021-04-02 上海米哈游网络科技股份有限公司 Server updating method and device, electronic equipment and storage medium
CN112988208A (en) * 2019-12-18 2021-06-18 腾讯科技(深圳)有限公司 Data updating method, device, equipment and storage medium
CN113110865A (en) * 2021-04-21 2021-07-13 北京字跳网络技术有限公司 Server hot updating method and device
CN113127361A (en) * 2021-04-23 2021-07-16 中国工商银行股份有限公司 Application program development method and device, electronic equipment and storage medium
CN113138787A (en) * 2021-04-28 2021-07-20 中消云(北京)物联网科技研究院有限公司 Program updating method and device
CN113268242A (en) * 2020-02-17 2021-08-17 北京达佳互联信息技术有限公司 Code compiling time length determining method and device, electronic equipment and storage medium
CN113342323A (en) * 2021-06-29 2021-09-03 银清科技有限公司 Method and device for software online development
CN113553040A (en) * 2021-07-20 2021-10-26 中国第一汽车股份有限公司 Registration realization method, device, equipment and medium for visible and spoken identification function
CN113867832A (en) * 2021-09-15 2021-12-31 广州云徙科技有限公司 Method, system, computer device and medium for dynamically modifying business data logic
CN114416567A (en) * 2022-01-20 2022-04-29 浙江吉利控股集团有限公司 Application program access method and device
CN114625397A (en) * 2022-05-17 2022-06-14 山东捷瑞数字科技股份有限公司 JAVA code hot updating device and method
CN115576589A (en) * 2022-12-08 2023-01-06 平安银行股份有限公司 Program hot updating method, electronic equipment and storage medium
CN117806688A (en) * 2024-03-01 2024-04-02 腾讯科技(深圳)有限公司 Thermal update detection method, thermal update detection device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463578B1 (en) * 1999-11-23 2002-10-08 International Business Machines Corporation Systems, methods and computer program products for debugging java server page files using compiled java class file modifications
CN102402427A (en) * 2010-09-09 2012-04-04 阿里巴巴集团控股有限公司 Method and device for updating Java application program
CN109726052A (en) * 2018-12-29 2019-05-07 北京金山安全软件有限公司 Method and device for realizing server thermal repair and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6463578B1 (en) * 1999-11-23 2002-10-08 International Business Machines Corporation Systems, methods and computer program products for debugging java server page files using compiled java class file modifications
CN102402427A (en) * 2010-09-09 2012-04-04 阿里巴巴集团控股有限公司 Method and device for updating Java application program
CN109726052A (en) * 2018-12-29 2019-05-07 北京金山安全软件有限公司 Method and device for realizing server thermal repair and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RUANJF: "JVM INSTRUMENT使用介绍", 《HTTPS://WWW.RUNJF.COM/JAVA/JVM-INSTRUMENT》 *
未分配微服务: "如何热更新线上的Java服务器代码", 《HTTPS://WWW.SHUZHIDUO.COM/A/PRDBGGP7ZN/》 *
高扬: "Java动态追踪技术探究", 《HTTPS://TECH.MEITUAN.COM/2019/02/28/JAVA-DYNAMIC-TRACE.HTML》 *

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704082A (en) * 2019-09-25 2020-01-17 许昌许继软件技术有限公司 Continuous integration method and system for monitoring platform
CN110780864A (en) * 2019-10-30 2020-02-11 网易(杭州)网络有限公司 Control method and device for class method replacement, storage medium and electronic equipment
CN111061486A (en) * 2019-12-10 2020-04-24 杭州有赞科技有限公司 Android application program increment method
CN111061486B (en) * 2019-12-10 2022-06-24 杭州有赞科技有限公司 Android application program increment method
CN112988208B (en) * 2019-12-18 2023-06-30 腾讯科技(深圳)有限公司 Data updating method, device, equipment and storage medium
CN112988208A (en) * 2019-12-18 2021-06-18 腾讯科技(深圳)有限公司 Data updating method, device, equipment and storage medium
CN113268242A (en) * 2020-02-17 2021-08-17 北京达佳互联信息技术有限公司 Code compiling time length determining method and device, electronic equipment and storage medium
CN111580813B (en) * 2020-03-25 2022-09-02 博雅信安科技(北京)有限公司 Automatic management method for Java class hot update
CN111580813A (en) * 2020-03-25 2020-08-25 博雅信安科技(北京)有限公司 Automatic management method for Java class hot update
CN111638907A (en) * 2020-04-20 2020-09-08 北京达佳互联信息技术有限公司 Method, device, terminal and storage medium for replacing third-party code segment
CN112068875A (en) * 2020-08-04 2020-12-11 广州太平洋电脑信息咨询有限公司 System and method for realizing thread filtering strategy based on java dynamic loading
CN112068875B (en) * 2020-08-04 2024-05-17 广州太平洋电脑信息咨询有限公司 System and method for realizing thread filtering strategy based on java dynamic loading
CN112199110A (en) * 2020-10-16 2021-01-08 上海睿成软件有限公司 Restart-free operation and maintenance upgrading method, system, device and medium
CN112199110B (en) * 2020-10-16 2022-05-31 上海睿成软件有限公司 Restart-free operation and maintenance upgrading method, system, device and medium
CN112463303A (en) * 2020-12-01 2021-03-09 中国工商银行股份有限公司 JAVA virtual machine class loading method and system
CN112463303B (en) * 2020-12-01 2023-11-24 中国工商银行股份有限公司 JAVA virtual machine class loading method and system
CN112596772A (en) * 2020-12-15 2021-04-02 上海米哈游网络科技股份有限公司 Server updating method and device, electronic equipment and storage medium
CN113110865A (en) * 2021-04-21 2021-07-13 北京字跳网络技术有限公司 Server hot updating method and device
CN113127361B (en) * 2021-04-23 2024-02-23 中国工商银行股份有限公司 Application development method and device, electronic equipment and storage medium
CN113127361A (en) * 2021-04-23 2021-07-16 中国工商银行股份有限公司 Application program development method and device, electronic equipment and storage medium
CN113138787A (en) * 2021-04-28 2021-07-20 中消云(北京)物联网科技研究院有限公司 Program updating method and device
CN113342323B (en) * 2021-06-29 2024-03-29 银清科技有限公司 Method and device for online development of software
CN113342323A (en) * 2021-06-29 2021-09-03 银清科技有限公司 Method and device for software online development
CN113553040A (en) * 2021-07-20 2021-10-26 中国第一汽车股份有限公司 Registration realization method, device, equipment and medium for visible and spoken identification function
CN113553040B (en) * 2021-07-20 2022-12-02 中国第一汽车股份有限公司 Registration realization method, device, equipment and medium for visible and spoken identification function
CN113867832B (en) * 2021-09-15 2024-04-02 广州云徙科技有限公司 Method, system, computer equipment and medium for dynamically modifying business data logic
CN113867832A (en) * 2021-09-15 2021-12-31 广州云徙科技有限公司 Method, system, computer device and medium for dynamically modifying business data logic
CN114416567A (en) * 2022-01-20 2022-04-29 浙江吉利控股集团有限公司 Application program access method and device
CN114625397A (en) * 2022-05-17 2022-06-14 山东捷瑞数字科技股份有限公司 JAVA code hot updating device and method
CN115576589A (en) * 2022-12-08 2023-01-06 平安银行股份有限公司 Program hot updating method, electronic equipment and storage medium
CN117806688A (en) * 2024-03-01 2024-04-02 腾讯科技(深圳)有限公司 Thermal update detection method, thermal update detection device, computer equipment and storage medium
CN117806688B (en) * 2024-03-01 2024-05-28 腾讯科技(深圳)有限公司 Thermal update detection method, thermal update detection device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110262818A (en) The hot update method of Java code, device, electronic equipment and storage medium
CN104951335B (en) The processing method and processing device of application program installation kit
CN104281478B (en) The method and device of more new application
CN104317648B (en) A kind of method and apparatus of monitoring advertisement
CN109032606A (en) The process of compilation method, apparatus and terminal of native applications program
CN107423106A (en) The method and apparatus for supporting more frame grammars
CN104020990B (en) Date selects control display methods and device
CN106528255B (en) Kind loading method and device
CN109716736A (en) Using data sharing and decision service platform
CN106201610A (en) Web application accesses the method and device of the primary function of terminal
CN105094830B (en) A kind of method and apparatus of performance objective function
CN113342355B (en) Code compiling method and device, electronic equipment and storage medium
CN113391811B (en) Function compiling method, function compiling device, electronic equipment and computer readable storage medium
CN105335200B (en) Method for upgrading system and device
CN104991857B (en) Trace debug method and device
CN110851370B (en) Program testing method and device and storage medium
CN111459494A (en) Code processing method and device
CN104951337B (en) File increment update method and device
CN109471714A (en) Platform deployment method, apparatus, equipment and storage medium
CN111338961A (en) Application debugging method and device, electronic equipment and storage medium
KR102188685B1 (en) Apparatas and method for generating application packages
CN109522286A (en) The treating method and apparatus of file system
CN114546436A (en) Micro front-end service updating method and device, electronic equipment and storage medium
CN109933357A (en) Application program updating method and device
CN109614334A (en) File test method, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190920

RJ01 Rejection of invention patent application after publication