some puzzles about Openjdk
Dalibor Topic
Dalibor.Topic at Sun.COM
Wed Apr 8 13:03:59 UTC 2009
Liu lianshun wrote:
> 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?
Is it possible to change behavior of programs by changing the
source code of OpenJDK? Yes. You can make them all crash
very fast by doing something bad in the VM for example. ;)
Is it possible to change behavior of programs without changing the
source code of OpenJDK? Yes, check out aspect oriented programming
using, for example, AspectJ.
> 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?
Volker Simonis wrote a couple of blog entries on how to get started hacking
on the VM, starting with:
http://weblogs.java.net/blog/simonis/archive/2008/01/hotspot_develop.html
have fun!
dalibor topic
--
*******************************************************************
Dalibor Topic Tel: (+49 40) 23 646 738
Java F/OSS Ambassador AIM: robiladonaim
Sun Microsystems GmbH Mobile: (+49 177) 2664 192
Nagelsweg 55 http://openjdk.java.net
D-20097 Hamburg mailto:Dalibor.Topic at sun.com
Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer
Vorsitzender des Aufsichtsrates: Martin Häring
More information about the build-dev
mailing list