About Jeed

Jeed is the speedy JVM execution and analysis toolkit.

Jeed is implemented and maintained by Geoffrey Challen and Ben Nordick. Jeed is open-source, MIT licensed, and actively developed and maintained. It has been in production use since 2019 supporting thousands of students who have taken CS1 at the University of Illinois. Hundreds of students use Jeed to run thousands of examples every day.

Can I Use Jeed?
Can I Use Jeed?

The short answer is: Yes! How? That depends.

Educational Use
Educational Use

If you’re an educator, feel free to use and embed examples through our public demo site. If you are using this to support a course in Java or Kotlin, and are embedding on a .edu domain, your examples will automatically run on servers provided by the University of Illinois, rather than paid for out of our pocket.

If you anticipate generating a fair amount of load, please get in touch. We can help you get Jeed set up on your own infrastructure. (It’s not hard.)

Commercial Use
Commercial Use

If you’d like to use Jeed to support a commercial project, please get in touch. We can arrange hosting for a competitive price, customize the look of Jeed for your project, or discuss how to directly use Jeed’s API.

Self-Hosting or Library Usage
Self-Hosting or Library Usage

You may also set up Jeed on your own. The backend containers are published on Docker Hub. Documentation is currently quite lacking, but we will be working on improving it soon.

Jeed comprises both a server providing a web API (published on Docker Hub) and a library (published on JitPack). The web API provides access to only a core subset of the features provided by the library, which also include a variety of useful Java and Kotlin source analysis tools such as source-level mutation, feature analysis, line counting, and so on. We have built several innovative CS1 tools using Jeed, including a novel autograder that provides code quality feedback in addition to correctness, and a debugging problem generator that uses Jeed’s source-level mutater.

Frontend Libraries
Frontend Libraries

The GitHub demo shows the use of several Jeed libraries that we use to support React TypeScript frontend development. These include packages that provide types, help format output, and simplify interaction with a Jeed backend. Documenatation is lacking, so it’s probably best to start by examining the demo, which uses all three packages.

What is Jeed?
What is Jeed?

Jeed was designed to enable in-browser playgrounds to support teaching introductory computer science in Java. Jeed meets two core design goals that allow it to serve effectively in that role.

Speed
Speed

Jeed rapidly and safely executes untrusted Java and Kotlin code. By performing all operations in-memory and using a hot compiler and JVM, Jeed is up to three orders-of-magnitude (1000x) faster than containerized isolation when compiling and running small examples. It achieves safety through a combination of existing Java security features and bytecode rewriting. Jeed’s safety features are exhaustively tested, both through multiple years of use supporting large CS1 classes, and by a large test suite of isolation escape attempts concocted by Ben, who has both an extensive knowledge of Java internals and an active imagination.

Jeed’s high performance allows a small amount of server resources to easily support a high degree of browser-based interactivity for a large course. This demo is currently running on a $6 DigitalOcean droplet. We usually keep a pair of containers up to support CS1 at Illinois, which is more than sufficient for class sizes numbering in the thousands using online materials that contain many embedded examples.

Relaxed Syntax
Relaxed Syntax

Jeed allows a relaxed form of Java syntax that we call snippets. Snippets can contain top-level statements, top-level method declarations, and multiple top-level class declarations. This allows Java to be taught in an intuitive bottom-up approach, rather than having students squint through the ton of unfamiliar syntax normally required by Java’s “Hello, world!” Teach objects first if you want to, not because Java gives you no other choice. Snippets also enable much more compact examples, since multiple classes can be combined into a single editor window, rather than being spread across multiple files as normally required by javac.

Don’t like snippets? Don’t use them! Jeed also supports compiling and running unmodified Java code, which can be split into multiple “files” and have execution start in a main method of your choosing.

Code Analysis Capabilities
Code Analysis Capabilities

Over time, Jeed has grown into a toolkit providing a number of useful code analysis and manipulation features—beyond just compiling and executing Java and Kotlin code. You can also use Jeed to:

Jeed also includes a number of capabilities that utilize bytecode manipulation. You can also use Jeed to:

We use mixtures of these features to provide advanced code quality feedback to students on homework problem submissions. For example, we can warn students about submissions that have too many code paths (cyclomatic complexity), contain dead code (coverage analysis), are overly inefficient (runtime line counting), or exhibit other pathologies (feature analysis).

Feature Demo
Feature Demo

There’s a slightly more complete Jeed demo here. It demonstrates several other Jeed capabilities, as well as complete request and response examples.

Credits
Credits

Several other University of Illinois students have contributed to Jeed:

Jeed builds on many other fantastic open-source tools:

Contribute
Contribute

If you want to help hack on Jeed, join us on GitHub. If you want to send a few bucks our way to keep the Jeed servers running, use this link.