https://github.com/phillbush/jvm Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Customer Stories + White papers, Ebooks, Webinars + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} phillbush / jvm Public * Notifications * Fork 10 * Star 107 simple java virtual machine License MIT license 107 stars 10 forks Activity Star Notifications * Code * Issues 1 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights phillbush/jvm This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/p] Use Git or checkout with SVN using the web URL. [gh repo clone phillb] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @tekknolagi @phillbush tekknolagi and phillbush Make native class method tables ... 3b601a0 Nov 2, 2021 Make native class method tables 3b601a0 Git stats * 21 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time tests mv InvokeSpecialNative.java StringTest.java November 2, 2021 13:40 LICENSE add license; fix PHONY targets October 30, 2021 20:00 Makefile mv InvokeSpecialNative.java StringTest.java November 2, 2021 13:40 README fix README (we have a license now!) November 1, 2021 19:59 class.c big chungus August 3, 2021 21:58 class.h Fix signed addition and comparison November 2, 2021 12:55 file.c Fix signed addition and comparison November 2, 2021 12:55 file.h initial commit April 27, 2021 10:26 java.1 initial commit April 27, 2021 10:26 java.c Make native class method tables November 2, 2021 15:27 javap.1 initial commit April 27, 2021 10:26 javap.c Make native class method tables November 2, 2021 15:27 memory.c big chungus April 27, 2021 22:15 memory.h initial commit April 27, 2021 10:26 native.c Make native class method tables November 2, 2021 15:27 native.h Make native class method tables November 2, 2021 15:27 util.c initial commit April 27, 2021 10:26 util.h initial commit April 27, 2021 10:26 View code README jvm This is the implementation of a simple Java Virtual Machine. This is the final project of the first semester of 2021 of the System Software course of the Computer Science department of the University of Brasilia. The following tools are implemented: * javap(1): Disassembles one or more class files. * java(1): Launches a Java application. SS Files * util.[ch]: miscellaneous routines * class.[ch]: routines and definitions related to class structure * native.[ch]: routines and definitions related to native code * memory.[ch]: routines and definitions related to JRE memory * file.[ch]: routines to read and free .class files * javap.c: .class file disassembler * java.c: .class file interpreter * tests/*: collection of simple .java files for testing the jvm SS Running To build the jvm, run the following command. This will create the executable file ./java for the jvm. make java To build the disassembler, run the following command. This will create the executable file ./javap for the disassembler. make javap To test the disassembler, run make on one of the test files with its suffix replaced with "p". For example, to test the disassembler on the test class tests/HelloWorld.class, run the following command. make tests/HelloWorld.p To test the disassembler on all test classes, run the following command. make testp To test the jvm, run make on one of the test files with its suffix replaced with "j". For example, to test the jvm on the test class tests/HelloWorld.class, run the following command. make tests/HelloWorld.j To test the jvm on all test classes, run the following command. make testj SS See Also The Java(r) Virtual Machine Specification: Java SE 8Edition, by Tim Lindholm, Frank Yellin, Gilad Bracha, Alex Buckley, Addison-Wesley, 2014. ISBN: 978-0-13-390590-8. https://docs.oracle.com/javase/specs/jvms/se8/html/ About simple java virtual machine Topics c java jvm c99 Resources Readme License MIT license Activity Stars 107 stars Watchers 5 watching Forks 10 forks Report repository Releases No releases published Packages 0 No packages published Contributors 2 * @phillbush phillbush Seninha * @tekknolagi tekknolagi Max Bernstein Languages * C 91.7% * Roff 4.1% * Java 3.0% * Makefile 1.2% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.