Beforehand make sure you followed all steps from here:
https://stackoverflow.com/a/78970091/15550211
Here is some code how I make my Async Connection with J-Link resp. OTK:
public class SessionHandler {
private final AsyncConnection connection;
private final Session session;
SessionHandler() throws jxthrowable {
System.loadLibrary("pfcasyncmt");
System.out.println("pfcasync.dll, loaded");
this.connection = pfcAsyncConnection.AsyncConnection_Connect(null, null, null, null);
this.session = connection.GetSession();
}
}