LmCast :: Stay tuned in

JOPA: Java compiler in C++, Jikes modernized to Java 6 with Claude

Recorded: Nov. 27, 2025, 1:02 a.m.

Original Summarized

GitHub - 7mind/jopa: JOPA: Java compiler in C++

Skip to content

Navigation Menu

Toggle navigation

Sign in

Appearance settings

Platform

GitHub Copilot

Write better code with AI

GitHub Spark


New

Build and deploy intelligent apps

GitHub Models


New

Manage and compare prompts

GitHub Advanced Security

Find and fix vulnerabilities

Actions

Automate any workflow

Codespaces

Instant dev environments

Issues

Plan and track work

Code Review

Manage code changes

Discussions

Collaborate outside of code

Code Search

Find more, search less

Explore

Why GitHub

Documentation

GitHub Skills

Blog

Integrations

GitHub Marketplace

MCP Registry

View all features

Solutions

By company size

Enterprises

Small and medium teams

Startups

Nonprofits

By use case

App Modernization

DevSecOps

DevOps

CI/CD

View all use cases

By industry

Healthcare

Financial services

Manufacturing

Government

View all industries

View all solutions

Resources

Topics

AI

DevOps

Security

Software Development

View all

Explore

Learning Pathways

Events & Webinars

Ebooks & Whitepapers

Customer Stories

Partners

Executive Insights

Open Source

GitHub Sponsors

Fund open source developers

The ReadME Project

GitHub community articles

Repositories

Topics

Trending

Collections

Enterprise

Enterprise platform

AI-powered developer platform

Available add-ons

GitHub Advanced Security

Enterprise-grade security features

Copilot for business

Enterprise-grade AI features

Premium Support

Enterprise-grade 24/7 support

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

Appearance settings

Resetting focus

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

7mind

/

jopa

Public

forked from daveshields/jikes

Uh oh!

There was an error while loading. Please reload this page.


Notifications
You must be signed in to change notification settings

Fork
1

Star
25

JOPA: Java compiler in C++

License

View license

25
stars

14
forks

Branches

Tags

Activity

Star

Notifications
You must be signed in to change notification settings

Code

Pull requests
0

Actions

Projects
0

Security

Uh oh!

There was an error while loading. Please reload this page.


Insights

Additional navigation options

Code

Pull requests

Actions

Projects

Security

Insights

7mind/jopa

 mainBranchesTagsGo to fileCodeOpen more actions menu  Folders and filesNameNameLast commit messageLast commit dateLatest commit History109 Commits.github.github  assetsassets  cmakecmake  docsdocs  runtimeruntime  scriptsscripts  srcsrc  testtest  tools/jikespgtools/jikespg  .envrc.envrc  .gitignore.gitignore  .gitmodules.gitmodules  CMakeLists.txtCMakeLists.txt  LICENSELICENSE  README.mdREADME.md  flake.lockflake.lock  flake.nixflake.nix  View all filesRepository files navigationREADMEContributingLicenseJOPA: Javac One Patch Away

A totally Claude'd effort in modernizing jikes, the historical independent javac implementation in C++.
Could be useful for bootstrap purposes.
Sister project: PyJOPA
Note: I've made multiple attempts to replace the legacy parser with a more modern one but Claude failed to deliver due to extremely tight coupling.
Java 5 & 6 Support
This fork adds comprehensive Java 5 (J2SE 5.0) and Java 6 (Java SE 6) language features:
Java 5 Features

✅ Generics - Type erasure with generic classes, methods, and bounded type parameters
✅ Enhanced For-Loop - For-each loops for arrays and Iterable collections
✅ Varargs - Variable-length argument lists with automatic array creation
✅ Enums - Enumerated types with synthetic methods (values(), valueOf())
✅ Autoboxing/Unboxing - Automatic conversions between primitives and wrappers (assignments, method args, return values, arithmetic)
✅ Static Imports - Import static members (single field, single method, wildcard)
✅ Annotations - Marker, single-element, and full annotations

Java 6 Features

✅ Class file version 50.0 - Generate Java 6 bytecode with -target 1.6
✅ Debug information - Enhanced debugging with -g flag for parameter names and local variables

Java 7 Features

✅ Diamond Operator - Type inference for generic instance creation (new ArrayList<>())
✅ Multi-catch - Catching multiple exception types in a single catch block (catch (IOException | SQLException e))
✅ Try-with-resources - Automatic resource management with AutoCloseable interface and exception suppression via addSuppressed()
✅ Strings in Switch - Switch statements with String expressions
✅ Binary Literals - Integer literals in binary form (0b1010)
✅ Underscores in Numeric Literals - Improved readability (1_000_000)

Java 7 Bytecode Status
Java 7 language features are fully supported for parsing and semantic analysis. However, bytecode generation has limitations:

Feature
-target 1.6
-target 1.7

Diamond operator
✅ Works
⚠️ Needs StackMapTable

Multi-catch
✅ Works
⚠️ Needs StackMapTable

Try-with-resources
✅ Works
⚠️ Needs StackMapTable

String switch
✅ Works
⚠️ Needs StackMapTable

Exception suppression (addSuppressed)
✅ Works
⚠️ Needs StackMapTable

Note: Use -source 1.7 -target 1.6 to compile Java 7 code to Java 6 bytecode, which runs on any JVM without verification issues. Full -target 1.7 support requires StackMapTable generation (not yet implemented).
Java 8 Features (Partial)

✅ Default Methods - Interface methods with default implementations
❌ Static Methods in Interfaces - Requires class file version 52.0
❌ Lambda Expressions - Not implemented
❌ Method References - Not implemented

Building

Requirements:

CMake 3.20+ and a C++17 compiler
iconv and/or ICU (uc) if encoding support stays enabled
Use the repo's nix/direnv setup (direnv exec . <cmd>) when available

With Nix:
nix develop
direnv exec . cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
direnv exec . cmake --build build -j"$(nproc)"
direnv exec . sh -c "cd build && ctest --output-on-failure"
direnv exec . cmake --install build --prefix /usr/local

Generic CMake:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build --prefix /usr/local

Useful CMake options:

-DJIKES_ENABLE_DEBUG=ON — Enable internal compiler debugging hooks
-DJIKES_ENABLE_NATIVE_FP=OFF — Force emulated floating point
-DJIKES_ENABLE_ENCODING=OFF — Skip iconv/ICU; otherwise CMake fails if neither is present
-DJOPA_ENABLE_JVM_TESTS=OFF — Disable runtime validation tests (javap/JVM execution)
-DJOPA_USE_NOVERIFY=OFF — Disable -noverify flag for JVM tests (requires StackMapTable)

jikes
Jikes - a Java source code to bytecode compiler - was written by Philippe Charles and Dave Shields of
IBM Research.
Jikes was written from scratch, from August 1996 to its first release on IBM's alphaWorks site in
April 1997. Work continued until August, 1997, at which time the project was shut down so the authors could resume
full-time work on the addition of support for inner classes.
The next release of Jikes was in March, 1998.
The availability of this release spurred new interest in a Linux version. The release of a Linux binary version
in early July, 1998, set new single-day download records for IBM's alphaWorks site.
The availability of a Linux binary version was soon followed by requests for the source. IBM management
approved the release in source form in September, 1998, followed by the release in early December, 1998.
Released in December, 1998, it was IBM's first open source project, and the first open-source project
from IBMk to be included in a major Linux Distribution (Redhat, Fall 1999).
Jikes was notable both in its automatic error correction, in the quality of its error messages, and
its compilation speed. It was routinely 10-20 times faster than javac, the standard compiler for Java
when Jikes was released.
IBM's involvement in the Jikes project ended in late 1999. Work continued, first at IBM's Developerworks (where
IBM was the original project in the Open Source Zone), and later at Sourceforge.
Active work on the project ceased in 2005. Changes in the Java language, most notably in the introduction of generics,
made Jikes less attractive.
Jikes remains usable for beginners to the Java language, especially those interested in just the core
features of the language.
The authors also believe Jikes to be of interest for its compiler designed and implementation, an believe it
to be a suitable subject of study for an introductory compiler course.
Notable features include the following:
Written from scratch by two people. The only third-part code in the first version was used read Java binary
class files, where were in Zip format.
No use of parser construction tools other than the Jikes Parser Generator, written by Philippe Charles.
Written in C++.
Includes a very efficient storage allocator and memory management.
The present repository includes Jikes versions 1.04 through 1.22. (Jikes 1.00 through 1.03 seem to have lost).
The sources used were retrieved from the Sourcforge site in early July, 2012. Each version is identified by a git tag.
Authors

Originally written by Philippe Charles and David Shields of IBM Research.
Subsequent contributors include, but are not limited to:

Chris Abbey
C. Scott Ananian
Musachy Barroso
Joe Berkovitz
Eric Blake
Norris Boyd
Ian P. Cardenas
Pascal Davoust
Mo DeJong
Chris Dennis
Alan Donovan
Michael Ernst
Bu FeiMing
Max Gilead
Adam Hawthorne
Diane Holt
Elliott Hughes
Andrew M. Inggs
C. Brian Jones
Marko Kreen
David Lum
Phil Norman
Takashi Okamoto
Emil Ong
Andrew Pimlott
Daniel Resare
Mark Richters
Kumaran Santhanam
Gregory Steuck
Brian Sullivan
Andrew G. Tereschenko
Russ Trotter
Andrew Vajoczki
Jerry Veldhuis
Dirk Weigenand
Vadim Zaliva
Henner Zeller

About

JOPA: Java compiler in C++

Resources

Readme

License

View license

Contributing

Contributing

Uh oh!

There was an error while loading. Please reload this page.


Activity

Custom properties
Stars

25
stars
Watchers

0
watching
Forks

1
fork

Report repository

Releases

3
tags

Sponsor this project

 

Uh oh!

There was an error while loading. Please reload this page.



patreon.com/7mind

https://www.buymeacoffee.com/7mind

Learn more about GitHub Sponsors

Packages
0

No packages published

Languages

C++
71.6%

C
21.3%

Java
3.1%

GAP
1.8%

CMake
0.7%

SWIG
0.5%

Other
1.0%

Footer

© 2025 GitHub, Inc.

Footer navigation

Terms

Privacy

Security

Status

Community

Docs

Contact

Manage cookies

Do not share my personal information

You can’t perform that action at this time.

JOPA: Java compiler in C++ represents a significant, albeit somewhat troubled, effort to modernize the historical jikes compiler – originally developed by IBM Research. This repository, maintained by 7mind, presents a fork of the original daveshields/jikes project, aiming to bring the compiler up-to-date with evolving Java language features. The project’s history reveals a complex journey, marked by ambitious goals and ultimately, limitations in achieving full bytecode generation support for newer Java versions.

The core of JOPA’s design centers around providing a C++ implementation of a Java compiler. The initial focus was on supporting Java 5 and 6 language features, including Generics, Enhanced For-Loops, Varargs, Enums, Autoboxing/Unboxing, and Static Imports. Furthermore, support was added for Java 6's class file version 50.0 and debugging information. A notable, partial, effort was made to support Java 7, incorporating features like the Diamond Operator, Multi-catch, Try-with-resources, String switch, Binary Literals, and Underscores in Numeric Literals. However, full support for Java 7’s bytecode generation required StackMapTable support, a feature not yet implemented.

The development process, as outlined in the README, highlights significant technical challenges. The tight coupling between the parser and the core compiler, specifically due to the legacy parser used, proved difficult to overcome, hindering the compiler’s ability to generate modern Java 7 bytecode. The project acknowledged limitations around StackMapTable generation, a crucial element for achieving compatibility with newer JVMs.

Building JOPA requires CMake 3.20 or later and a C++17 compiler. The recommended approach utilizes the repo’s nix/direnv setup for a streamlined build process. It relies heavily on CMake for configuration and then utilizes it to build the project, leveraging multiple cores for reduced compilation times. Important CMake options are configurable, including enabling debugging hooks and choosing between emulated and native floating-point support.

The project’s origins are intertwined with the history of jikes, which was initially developed by Philippe Charles and David Shields at IBM Research. Their initial release in 1997, known for its speed and helpful error messages, gained widespread recognition and was even included in Redhat Linux in 1999. The project continued to evolve, benefiting from contributions from numerous individuals over the years, including Chris Abbey, Musachy Barroso, and others. Although IBM discontinued its formal involvement in late 1999, the project continued, first at Developerworks and later on Sourceforge. The project’s development was eventually halted due to the shifting landscape of the Java language, particularly the introduction of generics, which presented significant technical hurdles.

Despite these challenges, JOPA remains valuable as a snapshot of a dedicated effort to modernize a historical compiler and as a demonstration of the complexities involved in building a compiler from scratch. It provides insight into the evolution of the Java language and the challenges of achieving full compatibility with Java bytecode. The project's legacy serves as a reminder of a smaller, yet ambitious, undertaking within the broader world of Java development.