Mix gelatin and water; let thicken slightly. Add remaining ingredients and chill until firm.
2.
For topping, mix sugar, flour, egg and pineapple juice and cook until thick. Add cream cheese; stir smooth. Let cool. Mix whipped topping as directed; fold in. Spread on gelatin. Sprinkle coconut on top and chill.