Sending serial data to Uno via Java. Code works on Uno R3 but not on Mega2560

Robin2:
Have you the Mega and the Uno connected at the same time?

I haven't used Windows for years so forgive me if this does not apply ....

If you only have the Uno connected and communicating with the Java code and then plug out the Uno and replace it with the Mega will the PC see it attached to the same port so that the same Java code will work?

I'm pretty sure I have communciated with an Uno and Mega using JSSC (I'm using JRuby on Ubuntu).

...R

Hey Robin2!
Im still struggling with this issue. Im only connecting one board at a time.

So here is a procedure that im following
Arduino Uno:
1)uploaded Blink LED example to test if pin13 works: works!
2)uploaded a code that uses Serial.read() command to search for "L" character and turn led on and off.
3)sent "L" to arduino via Serial Monitor (Arduino IDE). LED works!
4)Went to a device manager and found the port name my arduino is plugged in: "COM10"
5)Edited java code so that it sends stuff to "COM10".
6)Ran Java. Java sends "L" using this section of code (jSSC library)

try {
                        serialPort.writeString("L"); 
                    } catch (SerialPortException ex) {
                System.out.println(ex);
                    }

and it works!!!

Arduino Mega 2556
1)uploaded Blink LED example to test if pin13 works: works!
2)uploaded a code that uses Serial.read() command to search for "L" character and turn led on and off.
3)sent "L" to megavia Serial Monitor (Arduino IDE). LED works!
4)Went to a device manager and found the port name my arduino is plugged in: "COM11" (note different port)
5)Edited java code so that it sends stuff to "COM11".
6)Ran Java. Java sends "L" using this section of code (jSSC library). DOESNT WORK!!!!

I found 1 more Uno and 1 more MEGA board and repeated this. It worked on the other UNO and didnt work on the MEGA..... what is going on?