Hello gerbil,
I will assume you want to work with J2SE - the links will reflect
that.
There are a few prerequisites that you need to address prior to
starting...
- register at Sun's site and agree to the license conditions.
- have one of the supported systems (e.g., Solaris, Windows 95-XP or
NT, Linux).
- download the source for the Java Development Kit.
There is further information about this at...
http://wwws.sun.com/software/java2/download.html
There are detailed instructions on the build process at...
http://java.sun.com/j2se/1.4/scsl/build.html
Check the tool dependencies in the system specific files - in
particular, you may have to install a second copy of the C compiler to
satisfy the needs of the JDK build process. If you are doing a Linux
build, I would recommend the use of Open Motif and not Lesstif in
building the development kit. Open Motif is a much more complete
implementation of Motif. Ask for clarification if you need help on
this step.
At this point, set up the source and target directories and define
environment variables as described in the build instructions. In the
top level source directory there should be a file named "Makefile",
"makefile", or "GNUmakefile". This file defines the rules to be
followed in general and should then run make on all subordinate
directories to build all the applications and libraries.
At this point, copy the original file to Makefile.orig (or something
similar) in case you make a mistake and need to start over. Since you
want to debug the generated code, you need to modify the commands used
to compile and link (or build the libraries) so that debugging
information is used (usually -g, but check the documentation to be
sure). Save the updated make file. You may want to do
gnumake -p -n all DEV_ONLY=true (and other options)
to have gnumake print out the rules and commands to be executed w/o
actually performing the build. If that checks out OK, then run make
w/o the -n (and optionally -p) to build the development kit.
Run the demonstration programs to verify that the build was done w/
debugging enabled. You should be able to run jdb on the demo programs
to confirm it was done correctly. Then you should be able to develop
your tools and debug them (including the run time library) using the
JDK built in this way.
Do not hesitate to ask for clarification on these instructions. If you
run into a problem - describe the problem and I should be able to get
you past the hard spots. Good luck.
--Maniac |