TDengine/docs/examples/JDBC/JDBCDemo
She Yanjie 05ba8289a5
docs: jdbc release 3.7.6 (#33293)
* chore(jdbc): update jdbc version

* docs: jdbc release 3.7.6

* Update docs/en/14-reference/05-connector/14-java.md

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-10-17 16:24:15 +08:00
..
src/main/java/com/taosdata/example improve stmt doc, fix jdbc demo resultset bug 2025-01-13 15:01:58 +08:00
pom.xml docs: jdbc release 3.7.6 (#33293) 2025-10-17 16:24:15 +08:00
README-jdbc-windows.md move sample code to docs/example 2024-08-22 18:15:02 +08:00
readme.md move sample code to docs/example 2024-08-22 18:15:02 +08:00

How to Run the JDBC Demo Code On Linux OS

TDengine's JDBC demo project is organized in a Maven way so that users can easily compile, package and run the project. If you don't have Maven on your server, you may install it using

sudo apt-get install maven

Install TDengine Client

Make sure you have already installed a tdengine client on your current develop environment. Download the tdengine package on our website: https://www.taosdata.com/cn/all-downloads/ and install the client.

Run jdbcDemo using mvn plugin

run command:

mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcDemo"

and run with your customed args

mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcDemo" -Dexec.args="-host [HOSTNAME]"

Compile the Demo Code and Run It

mvn clean package -Dmaven.test.skip=true

To run JDBCDemo.jar, execute

java -jar target/JDBCDemo-SNAPSHOT-jar-with-dependencies.jar -host [HOSTNAME]