• Stars
    star
    241
  • Rank 162,144 (Top 4 %)
  • Language
    C
  • License
    MIT License
  • Created about 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

simple java virtual machine
                                  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.


§ 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


§ 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


§ See Also

The Java® 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/

More Repositories

1

xmenu

a x11 menu utility
C
287
star
2

pmenu

A pie-menu in xlib and imlib2.
C
205
star
3

xnotify

read notifications from stdin and pop them up on the screen
C
157
star
4

xprompt

A dmenu rip-off with contextual completion
C
97
star
5

xfiles

Configurable and simple file manager for X11
C
92
star
6

shod

mouse-based window manager that can tile windows inside floating containers
C
86
star
7

xclickroot

click on root window and run a command
C
83
star
8

shod-old

hybrid (floating and tiling) tabbed window manager
C
56
star
9

xnotes

some notes on Xlib programming
C
29
star
10

legv8

LEGv8 CPU implementation and some tools like a LEGv8 assembler
Verilog
28
star
11

aoc

solutions for advent of code in awk
Awk
23
star
12

fmutils

File management utilities in POSIX shell scripts.
Shell
19
star
13

paginator

X11 desktop pager dockapp
C
17
star
14

pomod

pomodoro daemon
C
14
star
15

xutils

X utilities in POSIX shell scripts.
Roff
12
star
16

man2md

man page to markdown converter
Awk
12
star
17

home

dotfiles etc
Shell
10
star
18

plumb

yet another plumbing utility for UNIX
C
10
star
19

xclimsg

send X11 client message
C
10
star
20

catb-mb

The Cathedral and the Bazaar: A troff -mb Unauthorized Edition
Roff
9
star
21

ctrlmenu

unified menu system for X11 (sxhkd + xmenu + dmenu)
C
9
star
22

calendar

print upcoming events
Awk
8
star
23

hexadecaicons

personal collection of 16x16 xpm icons
Makefile
8
star
24

incipit

the incipit plain text markup language, and some troff macro packages
Roff
8
star
25

mpv-concat

mpv script to interactively create a input file for ffmpeg -f concat
Lua
8
star
26

seninha.org

personal website
Awk
7
star
27

simp

A Simplistic Programming Language
C
7
star
28

xcliputils

X11 clipboard management utilities
C
7
star
29

simpletron

The Simpletron Simulator and The Simple Basic Compiler
C
6
star
30

haiku-icons

Haiku icon theme; can be built into svg and/or png XDG-compliant icon set
Shell
6
star
31

xfilter

X11 interactive filter
C
6
star
32

wmlaunchbutton

docked button to launch a command
C
6
star
33

cwdof

Get current working directory of a given process in OpenBSD.
C
6
star
34

vcd2svg

Draw waveform from a vcd file into a svg image
Awk
6
star
35

control

The libcontrol Xt-based X11 widget toolkit
C
6
star
36

orgutils

personal organization utilities
C
6
star
37

xurgent

set window urgency hint or demands-attention state
Roff
5
star
38

focus

Focus window, workspace or monitor by direction or cycle through them.
C
5
star
39

wmpdart

mpd client and window maker dockapp that shows album art
C
5
star
40

9ball

bouncing ball game for Plan 9
C
5
star
41

graph

graph drawing program, from The AWK Programming Language book, but with unicode braille characters
Awk
5
star
42

automata.scm

implementation of automata in r7rs scheme
Scheme
4
star
43

todo

print next tasks
Awk
4
star
44

lsd

list desktops
C
3
star
45

lsc

list X11 clients
C
3
star
46

expenv

expand environment variables
Awk
3
star
47

closest

focus the closest window in a given direction
3
star
48

hoc

high order calculator: an interpreter for a simple language for floating point arithmetic
C
3
star
49

readme

README reader
Makefile
2
star
50

tbgen

Testbench generator in AWK for Verilog modules
Shell
2
star
51

wrappers

wrappers around some programs
Shell
2
star
52

fqa

9front fqa rewritten in incipit
Roff
2
star
53

rolldice

roll virtual dice
C
2
star
54

xbindecho

echo something when a key (or mouse button) is pressed
C
2
star
55

rsa

RSA command-line utilities (THIS IS A COLLEGE PROJECT; USE IT FOR EDUCATIONAL PURPOSES ONLY!)
C
2
star
56

jbounce

bouncing ball game based on JezzBall
Java
1
star
57

skip

skip text between two strings
Awk
1
star
58

maori

Notas sobre a língua Māori em Português.
Makefile
1
star
59

tadepe

What if the cyrillic and latin alphabets had a child?
Awk
1
star
60

phillbush

phillbush
1
star
61

nixers2021

source for the slides used during my presentation at nixers.net conf 2021
Roff
1
star
62

automata.pic

troff's pic(1) macros to draw finite-state machines
Roff
1
star