I am trying to run Arduino in processing. I upload FIRMATA and I install all libraries for processing.
However, it never works, but if I run in Arduino, it works.
There are a number of Firmata sketches. Which one did you upload?
Did you bother to read the comments in the Processing sketch? The Processing sketch gets a list of ports that the Arduino might be attached to. That list might have 0 elements in it, in which case the Arduino is not available. It might have one element in it, in which case the Arduino port is at position 0 in the list. The list might have 2 or more elements in it, in which case the Arduino might be at position 0, or it might not.