Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Java v2 - Amazon Timestream

Java v2

To get started with the Java 2.0 SDK and Amazon Timestream, complete the prerequisites, described below.

Once you've completed the necessary prerequisites for the Java 2.0 SDK, you can get started with the Code samples.

Prerequisites

Before you get started with Java, you must do the following:

  1. Follow the AWS setup instructions in Accessing Timestream for LiveAnalytics.

  2. You can configure the AWS SDK as a Maven dependency as described in Using the SDK with Apache Maven.

  3. Set up a Java development environment by downloading and installing the following:

Using Apache Maven

You can use Apache Maven to configure and build AWS SDK for Java projects.

Note

To use Apache Maven, ensure your Java SDK and runtime are 1.8 or higher.

You can configure the AWS SDK as a Maven dependency as described in Using the SDK with Apache Maven. The changes required to the pom.xml file are described here.

You can run compile and run your source code with the following command:

mvn clean compile mvn exec:java -Dexec.mainClass=<your source code Main class>
Note

<your source code Main class> is the path to your Java source code's main class.

Next topic:

Go

Previous topic:

Java
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.