--- sidebar_label: Java title: Connect with Java Connector description: Connect to TDengine cloud service using Java connector --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; ## Add Dependency ```xml title="pom.xml" {{#include docs/examples/java/pom.xml:dep}} ``` ```groovy title="build.gradle" dependencies { implementation 'com.taosdata.jdbc:taos-jdbcdriver:3.0.0.0' } ``` ## Config Run this command in your terminal to save the JDBC URL as variable: ```bash export TDENGINE_JDBC_URL="" ``` ```bash set TDENGINE_JDBC_URL="" ``` ```powershell $env:TDENGINE_JDBC_URL="" ``` Alternatively, you can set environment variable in your IDE's run configurations. :::note Replace with real JDBC URL, it will seems like: `jdbc:TAOS-RS://example.com?usessl=true&token=xxxx`. To obtain the value of JDBC URL, please log in [TDengine Cloud](https://cloud.tdengine.com) and click "Data Insert" on the left menu. ::: ## Connect Code bellow get JDBC URL from environment variables first and then create a `Connection` object, witch is a standard JDBC Connection object. ```java {{#include docs/examples/java/src/main/java/com/taos/example/ConnectCloudExample.java:connect}} ``` The client connection is then established. For how to write data and query data, please refer to and .