Hi,
I created a standalone java class and added the apns-0.2.0-SNAPSHOT.jar
file in the build path then i tried to call the service. At that time
i'm getting the below exception.
Can anyone pls help me?
java.lang.NoClassDefFoundError: Could not initialize class com.notnoop.apns.internal.Utilities
Here i've included my code for reference.
public static void main(String[] args) {
ApnsServiceBuilder serviceBuilder = APNS.newService();
serviceBuilder = serviceBuilder.withCert("D:/Manickam/Java/Pranav/Pranav.p12", "pranav123");
ApnsService apnsService = serviceBuilder.withSandboxDestination().build();
//ApnsService service =
APNS.newService().withCert("D:/Manickam/Java/Pranav/Pranav.p12",
"pranav123").withSandboxDestination().build();
String payload = APNS.newPayload().alertBody("Can't be simpler than this!").build();
String token = "fedfbcfb....";
ApnsNotification apns = apnsService.push(token, payload);
System.out.println("Result :" + apns.toString());
}
Thanks,
Java