How Java compiles concurrent code

Rémi Forax forax at
Mon Jan 24 11:45:17 PST 2011

On 01/24/2011 08:32 PM, Edmon Begoli wrote:
> Hi,
> I am doing a research project on the compilation strategies employed 
> by different families of languages (compiled, functional, 
> compiled-interpreted) and I would like to get some information on how 
> Java compiles synchronized and concurrent code (Thread/Runnable routines).

javap is your friend.
Take a concurrent code, compile it with javac and see it with javap -c

But you won't see a lot of things because in Java, all is hidden in the VM.

> I would to ask you if you can provide some examples or, if even 
> available, point me to a tutorial that shows how Java compiles such 
> routines.
> Thank you in advance,
> Edmon


More information about the compiler-dev mailing list