aaa....a heated debate. i better stay out of it and only provide some input. gaijin or gaikokujin hasn't been used since the beginning of time. before gaikokujin japan used 異国人 ikokujin or sometimes 異邦人. 異 means different. before that i think japan used something along the lines with ppl from the south. nagoyankee might know. (no, i am not implying that u r that old
)
after having started in such a civilised matter i feel that i can at least end with an opinion. i would favour the approach that it is not the word in itself that is derogatory but how it is used. if the person saying it intends for it to be used then i would think that that person shouldn't use it. but then again how do u know that? then again there r words that one perhaps should avoid all together, 三国人 might be one of those words.
the reasoning that japanese ppl can't hate the word gaijin is just nonsense. take the very unfortunate word bitch, usually aimed at the female population, but as a male i can't hate it? that logic doesn't make sense.
and a history lesson for tommasi, european countries fought the japanese too during the WWII.