I found the reason now, it's beacuse the Java 1.5.0_06 or above haven't set it own JavaHome value in Registry.
To solve it, open the command prompt and type regedit.
Go to HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
Here has two folder:1.5 & 1.5.0_<your version>
Click in it you will find that the JavaHome value is set to 1.
You need to change it to your java home path.
e.g. C:\Program Files\Java\jdk1.5.0_<your version>
Hope it will help.
Reason for Java 5.0 or above cannot compile in TextPad
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard