I agree with everybody that if your knees really hurt you should in the first place take care of yourself and sit crosslegged.
I also would like to voice a slightly different opinion.
I have 1 really bad knee (been operated on it twice), yet I can feel for myself there is a difference between my bad knee hurting because it is bad and my legs hurting for some other reason. Most of the time when my legs hurt it is because I feel my muscles being (overly) strechted.
This feeling will improve with time and practice!
IMHO to many people confuse pain because their not use to it with pain because of bad knees. This holds for seiza, shikko and suwari waza !
Another point to make is that there is a proper way to sit in seiza where the force is evenly distributed. This way there is less stress on the knees and the feet. (Please dont ask me to explain it, because I think I will fail horrorably trying to explain it in writing, better to ask and observe closely someone how can easily sit in seiza).