Download the source, go to the build directory, and enter (on Windows):
or on Linux:
I have always used a 1.5 JDK, I think that 1.4.2 also works (haven't tried that in a year), not sure if 1.6 will work. You also need a network connection because the third party libraries are pulled down on the first build.
Thank you for your help
what I really concern is that how the build.xml is writen. what the targets really mean and where is the magicbuild file and where is the jsp and other resource coming from.
What Peter implicitly meant is that you don't have to understand how it works under the hood, those scripts are only used to build our stuff.
If you are worried about building your own portlets, you can use anything you want (anything that builds a war will do it, call it ant, call it maven, call it eclipse WTP...)