This is the second re-write of the CVM.
The first implementation of the CVM has been made in C which can be reachable at cvm/archive for archive purposes Since the first implementation does not work as intended
The master branch is the current and active version of the CVM which is rewrite in C++
A toy Java Virtual Machine coded in C(and C++). CVM is a simple and lightweight JVM that aims to provide a basic understanding of JVM internals and bytecode execution. This project serves as an educational and fun resource for those interested in learning about JVM implementation details.
- Implementation of a minimalistic JVM in C
- Support for executing Java bytecode
- Basic class loading and method execution
- Instruction set interpretation
Follow these steps to get started with CVM:
-
Clone the Repository:
git clone https://github.com/lvntky/CVM.git cd CVM
-
Compile the Source Code:
mkdir build make install
-
Run a Java Program:
./cvm JavaProgram.class
CVM accepts a Java class file as a command-line argument. It loads and executes the main method of the specified class.
Example:
./cvm HelloWorld.class
We welcome contributions to CVM. If you want to add new features, fix bugs, or improve documentation, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Open a pull request explaining your changes.
CVM is licensed under the MIT License. See the LICENSE file for details.
CVM was inspired by a passion for JVM internals and bytecode execution. I would like to thank the Java community for providing valuable resources and documentation on JVM internals.
If you have questions or need assistance with CVM, feel free to contact me at [email protected] .
Happy coding! 🚀