java application & arduino

Hello, i configured arduino to read the value of resistances generated by a LDR, and i am creating an application in java that needs to receive the data read by the arduino. How do i do this connection, java/arduino?

thanks and sorry for my english.

http://www.arduino.cc/playground/Interfacing/Java

thanks for the help, but i already compiled that code and nothing happens, there is something that i am doing wrong?

Run the Arduino code and click on the Serial Monitor button. You should see the "Hello World" message arrive once every second. Does that work?

Do you get any messages when you run the java code? "Started" at least?

The message "hello world" appears normally, but when i run the java code, nothing happens, even the "started" doesn't appears.

That does not bode well. Sounds like the problem is in your PC or the installation of Java or one of the libraries. Perhaps some java forum would be able to provide better assistance.