nullpointer exception

I'm using Arduino and Processing to create an instrument that responds to touch by lighting LEDs and playing MP3 files.

My code was working until today. I don't know why it's not working. I'm a beginner with this stuff so I don't know how to fix it or what went wrong.

I'm getting a Null Pointer exception error highlighting the 'while (port.available () > 0 ){'

I tried changing the value to 1 and also tried putting a writing while (port.available () > 0 );{
but neither worked.

  while (port.available () > 0) {
    int myChar = (;
    if (myChar == 'A') {                  //CHECK ARDUINO INPUT AND PLAY CORRESPONDING TONES
      player_1.cue(0);                 ;

Are you sure that the Arduino is sending the correct values ? Can you print them in Processing to check ?
How about posting your complete Arduino code as this is an Arduino forum.

but neither worked.

The problem is not that the available() call method has a problem. It is that port is a NULL pointer.