Working integration with Java program