How does the .exe Compiler work?

I am currently trying to learn how to make an .exe out of a .java/.jar file. Since I’m curious and Launch4j kinda doesn’t work I want to write such a program myself.
Since Processing has a simular function I figured it would be a good place to start.
So how does the compiler work or where can I start looking?

you can’t write a Java Compiler your own. That’s like a Boeing 747. Unless you have a PhD in Computer Science and a good team with you.

Seriously, try to get Launch4j to work.

processing IDE can make exe-files, check out menu File | Export please (iirc). Why don’t you use this?

(processing IDE doesn’t have its own compiler, it’s just a pre-compiler (to put some Java overhead to the processing Sketch (the text file)) and then uses Launch4j.)