some puzzles about Openjdk

Xiaobin Lu Xiaobin.Lu at Sun.COM
Wed Apr 8 10:47:34 PDT 2009


On 04/07/09 22:36, Liu lianshun wrote:
> Hi,
>  
> I've some puzzles from my recent learning about OpenJDK7.0.
> Firstly, I want to know that whether I can change the java programes' 
> behavior via changing some source files in OpenJDK, for examples, 
> execute the following codes will print "100".
>     int i=100;
>     System.out.println(i);
> My question is that how to print "200", without changing the source 
> codes. Is it possible?
You can achieve this by modifying the compiled byte code. Refer to Java 
VM specification for the spec of byte code.
>  
> Secondly, the number of files in the OpenJDK project is very large, I 
> want to know how these files are structured. Besides, how can I debug 
> the project? For examples, When I run HelloWorld, I use the command 
> "java HelloWorld", I want to know how the hotspot interpret this 
> command, I think the best way is reading the source codes, but I don't 
> know where to start.
Refer to http://wikis.sun.com/display/HotSpotInternals/Home and follow 
the links in that page to find out a in-depth review of hotspot.

-Xiaibin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/attachments/20090408/8ad7a8cd/attachment.html 


More information about the hotspot-runtime-dev mailing list