java program comm with arduino.

Hi, I have a java program with a on and off button in swing and I wanted to comm with the arduino? Is there a way to do this? Like sockets or something? thanks!

serial & cereal

Ain't google wonderful. You should try it sometime.

Maybe this from the Arduino site will get you started.

http://playground.arduino.cc/interfacing/java

I am not sure as I am just a teenager, what would be easiest. Sending a packet with data in it and having the arduino read the payload and turn on/off the relay, or using serial with RXTX library? Thanks!

Do you have an example of sending packets with data?

Use the JSSC library - support for RXTX seems to have stopped and JSSC is easier to use anyway.

If you had posted your question in the Interfacing section of the Forum you would have seen many similar questions.

...R