There’s Groovy. Their examples use a bit different syntax, like a lack of semicolons, and Gradle might also give the wrong idea. But it’s fully compatible with Java source code iirc, just adds its own stuff on top and broadens the allowed syntax a bit.
Groovy is highly compatible with Java and most Java code runs in Groovy without changes. However, it’s not 100% identical. Groovy introduces dynamic typing, additional syntax, and runtime behaviors that can differ from Java. JPlus, on the other hand, aims to keep Java syntax almost intact while adding null-safety and boilerplate code generation making it easier to apply to existing Java projects without rewriting code
Exactly, as you said, Kotlin isn’t a Java superset. you can’t just compile a Java file with Kotlin and have it work. JPlus works similarly in that it outputs standard Java source code rather than JVM bytecode.
However, JPlus is not merely a “preprocessor.” It actually parses Java source like a compiler, performs null-safety checks and boilerplate code generation on the generated parse tree, and finally produces standard Java code. In that sense, JPlus should be considered a compiler. The only difference is that its output is Java code; if the code generation step were extended to produce JVM bytecode directly, it could bypass the Java source entirely and generate bytecode straightaway.
The key point is that, just like TypeScript addresses JavaScript’s lack of type safety, JPlus fills in some of Java’s gaps. It allows you to keep almost all of your existing Java code while adding features like null-safety and automatic boilerplate generation, improving both safety and developer convenience.