I have simple test of Java DIO that should show how to use PWM. Code should dim LED.
I have a class
import java.io.*; import java.nio.IntBuffer; import jav