---
sidebar_label: Java
title: Connect with Java Connector
pagination_next: develop/insert-data
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
## Add Dependency
```xml title="pom.xml"
com.taosdata.jdbc
taos-jdbcdriver
2.0.39
```
```groovy title="build.gradle"
dependencies {
implementation 'com.taosdata.jdbc:taos-jdbcdriver:2.0.39'
}
```
## 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 "Connector" and then select "Java".
:::
## 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}}
```