How to log in to Leap (FEB8.6.4) by transferring parameters (uid and password) through a Java program?

I want to log in to Leap (FEB8.6.4) through the Java program to transfer parameters (uid and password). I don't know how to achieve it?