Friends, I want to connect and transfer data to COM PORT (either virtual or original) in JAVA?
The Java Communications API (also known as javax.comm) provides applications access to RS-232 hardware (serial ports)
This quest has been asked and answered many times:
http://stackoverflow.com/questions/544824/read-file-from-serial-port-java
http://stackoverflow.com/questions/336714/reading-serial-port-in-java
http://stackoverflow.com/questions/589334/how-to-read-and-write-from-the-serial-port-with-java
http://stackoverflow.com/questions/560328/reading-file-from-serial-port-in-java
http://stackoverflow.com/questions/264277/java-serial-communication-on-windows
to reference a few.
Personally I recommend SerialPort from http://serialio.com. From experience, I strongly do not recommend the Sun or IBM serial IO implementation, nor RxTx. Refer to my answer on some of the aforementioned questions.