⏱
15 mins remaining
Java
Learn how the Java SDK works
Steps in this module
Creating an instance of AtClient
To create an instance of AtClient, use one of the factory methods. Note: you must have the .atKeys
file in the ~/.atsign/keys
directory. You can generate a .atKeys file from using the Register CLI or Onboaring CLI if you already own the atSign.
String ATSIGN_STR = "@bob";
AtSign atSign = new AtSign(ATSIGN_STR);
AtClient atClient = null;
try {
atClient = AtClient.withRemoteSecondary(atSign);
} catch (AtException e) {
System.err.println(e);
e.printStackTrace();
}
// use atClient
There are a number of other factory methods for creating an AtClient instance to suit your needs. See the image below.
