Read complete documentation here https://docs.ic4j.com.
IC4J Java 11 Transport is a ReplicaTransport implementation built on the Java 11 built-in HTTP client (java.net.http.HttpClient). It is part of the IC4J open source library suite for interacting with the Internet Computer network from Java applications.
IC4J Java 11 Transport is available under Apache License 2.0.
Use this transport for Java applications running on JDK 11 or higher. Full documentation here.
ReplicaTransport transport = ReplicaJavaHttpTransport.create(icLocation);
Agent agent = new AgentBuilder().transport(transport).identity(identity).build();To add IC4J Java 11 Transport library to your Java project use Maven or Gradle import from Maven Central.
https://search.maven.org/artifact/org.ic4j/ic4j-java11transport/0.8.0/jarMaven:
<dependency>
<groupId>org.ic4j</groupId>
<artifactId>ic4j-java11transport</artifactId>
<version>0.8.0</version>
</dependency>Gradle:
implementation 'org.ic4j:ic4j-java11transport:0.8.0'You need JDK 11 or JDK 21 to build IC4J Java 11 Transport.
gradle build
Tests run against a local Internet Computer replica (dfx). Deploy the test canister first:
./scripts/deploy_local_tests.sh
Then run the tests:
gradle test
BLS certificate verification is disabled for local replica testing (configured automatically via jvmArgs in build.gradle).