Get Started with Java Development on the atPlatform.
Setting Up Your Development Environment
1. Install Java
The first step in getting your developer environment ready, is to install Java 8 or higher on your local machine.
2. Install Maven
Next step is to install maven and add it to your PATH. Maven is a great tool for managing Java projects and will be useful for development atPlatform applications.
3. Clone the Java Client
Create a new directory on your local machine where you want the java client source code to live. Change directory (cd) into this directory and git clone your fork.
git clone <your_fork_url> so that the source code is on your local machine.
- Ensure you are in the at_client directory:
- You should see
[INFO] BUILD SUCCESS
Be sure you’ve fully set up your development environment. Also ensure you’ve built and deployed the project by running
mvn installunder the
Our next step is to run the
Register.javaCLI to register a new atSign will be onboarded and a set of .atKeys will be generated. You can do this by running:
java -cp "target/client-1.0-SNAPSHOT.jar:target/lib/*" org.atsign.client.cli.Register <email@example.com>
java -cp "target/client-1.0-SNAPSHOT.jar;target/lib/*" org.atsign.client.cli.Register <firstname.lastname@example.org>
- If successful, the output should be similar:
Getting free atsign Got atsign: @64husky26 Sending one-time-password to :<email@example.com> Got response: Sent Successfully Enter OTP received on: <firstname.lastname@example.org>
- You will get a OTP (one-time password) in your entered email. Be sure to enter the OTP as received because it is case-sensitive. If successful, output should be similar to as follows:
xxxx Validating one-time-password Got response: Verified
- IMPORTANT: There will be a newly generated .atKeys file for your new atSign in
~/.atsign/keys. Congratulations, you’ve successfully registered a new atSign in the Java client. Note: The default properties in
config.yamlpoint to the production environment. Your new atSign will be registered to the root that is defined in