The Java environment is heavy and unwieldy.
It takes several seconds for it to fire up and start running and it's usually a burden on CPU and memory.
Flash on the other hand is considerably more lightweight.
Another factor is that Java applets are usually less visually attractive than flash.