DEV Community

Frank Delporte
Frank Delporte

Posted on • Originally published at webtechie.be

JavaFX In Action #22 with Matt Coley, diving into byte code and JARs with Recaf and JavaFX libraries

For my next JavaFX In Action interview, I talked with Matt Coley about Recaf and the JavaFX libraries he's working on. But unexpectedly, I got a deep-dive course on Java byte code, obfuscated code, and how JARs can be (ab)used to hide the real code they are executing...!

About Matt

Matt Coley got into Java development when he wanted to find out how Minecraft works. Because of his many experiments, he gained a lot of knowledge about Java byte code, how it can be converted back to Java code, and how JARs can hide the real code from the user or contain malicious code. He combines all his knowledge in the Recaf tool and the JavaFX libraries he created.

You can find him on:

Recaf

Recaf is an open-source Java bytecode editor that simplifies the process of editing compiled Java applications. To make things easier, Recaf abstracts away much of the class file format. Challenging tasks such as updating stack-frames are done automatically. Along with additional features to help in the process of editing classes, Recaf is the most feature-rich bytecode editor available.

Recaf UI

JavaFX Libraries

As Recaf wants to provide an IDE similar to IntelliJ IDEA, Matt needed a framework to manage tabs and docking. As he didn't find the perfect solution, he created the library BentoFX. Another nice visualization library he created for Recaf, is TreeMapFX, a flexible tree map chart control for JavaFX. Next to these libraries, Matt also created GLCanvas-FX, a small project showing a single basic JavaFX control used to display OpenGL content from an JOGL GLAutoDrawable. They are demonstrated in the interview, and available on GitHub.

BentoFX

TreeMapFX

GLCanvasFX

Video content

00:00 Who is Matt?

00:28 About the BentoFX library

01:47 About Recaf and the difference with JITWatch

03:06 Demo of Recaf

10:06 Why Recaf was created, compared to dirtyJOE

11:36 Inspecting the content of a class file

16:20 Tools used to convert Bytecode to Java and vice-versa

18:56 About the many "layers" in Java and where Recaf can help

21:15 Demo of BentoFX and TreeMapFX inside Recaf

23:25 What is obfuscated code with examples

27:26 Hiding Java code in other files and JAR tricks

32:39 Recaf wants to be the solution for handling all unexpected JAR-problems, for instance, researching malware

35:05 Connecting Recaf to a running JVM application

36:20 Demo of the De-Obfuscation feature

39:58 Recaf as a "De-Hacker" Tool

40:56 Demo of OpenGL in JavaFX

45:18 "The White Flash of Dead" bug and solution

47:28 Conclusion: Having a passion project, like Matt has Recaf, sets you out from the crowd and grow your career

More JFX In Action...

Click here for more posts with JFX In Action videos.

Top comments (0)