Example won't work on my Processing

Hi, I want to try my first processing program which read arduino serial value and display it. I copy and paste an example code from the interest http://arduinobasics.blogspot.com/2011/06/displaying-serial-data-from-arduino-uno.htmlbut it won't compile.

void setup() {
size(400,200);
myPort = new Serial(this, "COM13", 9600);
myPort.bufferUntil('\n');
font = createFont(PFont.list()[2],32);
textFont(font);
}

I changed the default COM to COM4 (my arduino serial port is COM4), the compiler highlighted "myPort = new Serial(this, "COM13", 9600);" and showed the below error messages, the strange thing is when I changed the COM to any other COM which my arduino is not using, the program compiled without error, I wonder what's wrong with it?

gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:467)
at processing.serial.Serial.(Unknown Source)
at processing.serial.Serial.(Unknown Source)
at sketch_sep18a.setup(sketch_sep18a.java:30)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.()
at processing.serial.Serial.errorMessage(Unknown Source)
at processing.serial.Serial.(Unknown Source)
at processing.serial.Serial.(Unknown Source)
at sketch_sep18a.setup(sketch_sep18a.java:30)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Thread.java:662)

COM port numbers greater than 9 need to be defined differently.

The Serial.list() function will return a list of serial ports that Processing can talk to. If the Arduino is connected to the PC, the port WILL be in the list. You can print the list using

println(Serial.list());

I changed the default COM to COM4 (my arduino serial port is COM4)

There is no default COM port, so it is hard to see what you changed.