This project is a Java-based interpreter for a custom programming language. The interpreter is designed to load, execute, and interpret bytecode instructions. The system consists of several classes that work together to provide a functional and efficient bytecode interpreter.
-
Bytecode Loading:
- Reads and parses bytecode files.
- Validates bytecode syntax and structure.
-
Execution Engine:
- Executes bytecode instructions.
- Supports various operations like arithmetic, control flow, and memory manipulation.
-
Interpreter:
- Interprets bytecode instructions and manages execution state.
- Handles variables, functions, and error reporting.
- Java Development Kit (JDK): Ensure you have JDK version 16 or later installed. You can download it from the Oracle website.
- IntelliJ IDEA: This IDE is recommended for building and running the project. You can download it from the JetBrains website.
-
Clone the Repository:
git clone https://github.com/jjestrada2/java-bytecode-interpreter.git cd java-bytecode-interpreter -
Open the Project in IntelliJ IDEA:
- Open IntelliJ IDEA.
- Click the "Open" button in the top right corner.
- Choose the folder named "java-bytecode-interpreter" from the cloned repository.
-
Configure Project Settings:
- Open the "Project Structure" window using
Ctrl+Alt+Shift+S. - In "SDK and Language Version," select a Java version that's at least Java 16.
- In "Project Settings," choose "Modules" and mark the "resources" folder as Resources.
- Open the "Project Structure" window using
-
Build the Project:
- Click the "Build" button at the top of the IDE (
CTRL+F9).
- Click the "Build" button at the top of the IDE (
-
Run the Interpreter via IntelliJ IDEA:
- Hit the play button in IntelliJ IDEA.
- OR right-click
Main.javaand selectRUN.
-
Run the Interpreter from Command Line:
-
Build the project to create a JAR file.
-
Open a console located in the same directory as the JAR and type:
java -jar java-bytecode-interpreter.jar <path-to-bytecode-file>
-
If you would like to contribute to this project, please fork the repository and create a pull request with your changes. Contributions are always welcome!
This project is licensed under the MIT License - see the LICENSE file for details.
- Juan Estrada - Developer of this project.
For support or inquiries, please contact Juan Estrada.