From Java code to Java heap