IP Library Granted Patent US 12,346,675
Granted Patent B1
US 12,346,675 · App. 18/945,838 · Granted Jul 1, 2025

Compilation and execution of code changes within a running java virtual machine

Inventor: David Michael Blake (London, GB)
Assignee: Morgan Stanley Services Group Inc.
G06F8/41G06F9/45504G06F16/1734
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,346,675
App. No.
18/945,838
Granted
Jul 1, 2025
Kind
B1
Abstract

Systems and methods for implementing an embedded compiler running within a Java Virtual Machine that recompiles code changes on-the-fly are disclosed. An embodiment of the present invention is directed to using scripts within an application codebase to define what actions to take following a code change and recompilation on a particular set of code. An embodiment of the present invention ensures that the new code is made available to the rest of the live running system in a way that avoids class or data version conflicts.

Claims (37)

1. A computer-implemented system comprising:

a computer server comprising one or more processors;

a memory component storing one or more compilation plans; and

non-transitory memory comprising instructions that, when executed by the one or more processors, cause the one or more processors to:

execute, via the computer server, an application in a Java Virtual Machine (JVM);

monitor, via a file watcher processor, a file change in a file running the application in the JVM;

responsive to the file change, retrieve, via the memory component, a compilation plan associated with the file; wherein the compilation plan comprises: a set of source code and a post-compile script;

compile, via a live compiler, the set of source code from the compilation plan;

create, via a constructor processor, a non-delegating classloader;

execute, via an executor processor, the post-compile script identified by the compilation plan; and

provide, via an interface, an output feedback from the post-compile script while the application is running in JVM.

2. The computer-implemented system of claim 1 , wherein the live compiler comprises a Scala compiler.

3. The computer-implemented system of claim 1 , wherein the compilation plan identifies what files to watch; what to compile; and one or more dependencies.

4. The computer-implemented system of claim 1 , wherein the interface comprises an explorer script input, a GUI script input and a text script input.

5. The computer-implemented system of claim 1 , wherein the interface comprises a script editor and a viewer.

6. The computer-implemented system of claim 1 , wherein the non-delegating classloader loads a newly compiled class and a different classloader is used on each compilation.

7. The computer-implemented system of claim 1 , wherein the compilation plan defines when a file changes, the set of source code is recompiled.

8. The computer-implemented system of claim 1 , wherein the post-compile script is executed to generate a recompiled class used by the application in the JVM.

9. The computer-implemented system of claim 1 , wherein the compilation plan is defined by a combination of case classes, traits and objects.

10. The computer-implemented system of claim 1 , wherein the live compiler supports a hot compile and a hot swap of UI views in a container.

11. A computer-implemented method, comprising the steps of:

executing, via a computer server, an application in a Java Virtual Machine (JVM);

monitoring, via a file watcher processor, a file change in a file running the application in the JVM;

responsive to the file change, retrieving, via a memory component, a compilation plan associated with the file; wherein the compilation plan comprises: a set of source code and a post-compile script;

compiling, via a live compiler, the set of source code from the compilation plan;

creating, via a constructor processor, a non-delegating classloader;

executing, via an executor processor, the post-compile script identified by the compilation plan; and

providing, via an interface, an output feedback from the post-compile script while the application is running in JVM.

12. The computer-implemented method of claim 11 , wherein the live compiler comprises a Scala compiler.

13. The computer-implemented method of claim 11 , wherein the compilation plan identifies what files to watch; what to compile; and one or more dependencies.

14. The computer-implemented method of claim 11 , wherein the interface comprises an explorer script input, a GUI script input and a text script input.

15. The computer-implemented method of claim 11 , wherein the interface comprises a script editor and a viewer.

16. The computer-implemented method of claim 11 , wherein the non-delegating classloader loads a newly compiled class and a different classloader is used on each compilation.

17. The computer-implemented method of claim 11 , wherein the compilation plan defines when a file changes, the set of source code is recompiled.

18. The computer-implemented method of claim 11 , wherein the post-compile script is executed to generate a recompiled class used by the application in the JVM.

19. The computer-implemented method of claim 11 , wherein the compilation plan is defined by a combination of case classes, traits and objects.

20. The computer-implemented method of claim 11 , wherein the live compiler supports a hot compile and a hot swap of UI views in a container.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 13, 2024
From: BLAKE, DAVID MICHAEL
To: MORGAN STANLEY SERVICES GROUP INC.
Reel/Frame 069244/0950 →
References Cited (30)
US 6118940A · Alexander, III et al. · 2000 [cited by applicant]
US 6754889B1 · Leverenz · 2004 [cited by examiner]
US 6851112B1 · Chapman · 2005 [cited by examiner]
US 7426721B1 · Saulpaugh et al. · 2008 [cited by applicant]
US 7444629B2 · Chirakansakcharoen · 2008 [cited by examiner]
US 7665075B1 · Daynes et al. · 2010 [cited by applicant]
US 8276125B2 · Fan · 2012 [cited by examiner]
US 8752008B2 · Herdeg et al. · 2014 [cited by applicant]
US 9760591B2 · Caudy · 2017 [cited by examiner]
US 10146515B1 · Sundresh · 2018 [cited by examiner]
US 10146522B1 · Sundresh · 2018 [cited by applicant]
US 10223097B2 · Weber · 2019 [cited by examiner]
US 10698668B1 · Pohlack et al. · 2020 [cited by applicant]
US 11237952B1 · Pearson et al. · 2022 [cited by applicant]
US 11573787B1 · Hashimi · 2023 [cited by examiner]
US 20050097534A1 · Clement et al. · 2005 [cited by applicant]
US 20060005171A1 · Ellison · 2006 [cited by applicant]
US 20080120595A1 · O'Farrell et al. · 2008 [cited by applicant]
US 20110145801A1 · Kaplinger et al. · 2011 [cited by applicant]
US 20120216184A1 · Jones et al. · 2012 [cited by applicant]
US 20150100951A1 · Raundahl Gregersen · 2015 [cited by applicant]
US 20160232017A1 · Raundahl Gregersen · 2016 [cited by applicant]
US 20190205240A1 · Craik et al. · 2019 [cited by applicant]
US 20200065124A1 · Chen et al. · 2020 [cited by applicant]
US 20210117308A1 · Burgos · 2021 [cited by applicant]
US 20220147376A1 · Jaeger · 2022 [cited by applicant]
US 20220311794A1 · Maya · 2022 [cited by examiner]
Mackenbach et al., “Coda: A Change Impact Analysis Tool for Scala”, 2015, Delft University of Technology, 64 pages. (Year: 2015). [cited by examiner]
“DCEVM, Enhanced Class Redefinition for Java”, https://dcevm.github.io, last accessed on Oct. 1, 2024, pp. 1-2. [cited by applicant]
“FAQ What is hot code replace?—Eclipsepedia”, https://eclipsse.org/, 2004, pp. 1-2. [cited by applicant]