TDengine/docs/examples/JDBC/taosdemo
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
..
.mvn/wrapper move sample code to docs/example 2024-08-22 18:15:02 +08:00
src merge: taos-tools and case 3.0 to main branch (#30802) 2025-04-17 15:29:23 +08:00
.gitignore move sample code to docs/example 2024-08-22 18:15:02 +08:00
mvnw move sample code to docs/example 2024-08-22 18:15:02 +08:00
mvnw.cmd move sample code to docs/example 2024-08-22 18:15:02 +08:00
pom.xml docs: jdbc release 3.7.6 (#33293) 2025-10-17 16:24:15 +08:00
readme.md doc: simple changes 2024-11-05 11:14:54 +08:00

cd tests/examples/JDBC/taosdemo
mvn clean package -Dmaven.test.skip=true
# Create tables first, then insert data
java -jar target/taosdemo-2.0.1-jar-with-dependencies.jar -host <hostname> -database <db name> -doCreateTable true -superTableSQL "create table weather(ts timestamp, f1 int) tags(t1 nchar(4))" -numOfTables 1000 -numOfRowsPerTable 100000000 -numOfThreadsForInsert 10 -numOfTablesPerSQL 10 -numOfValuesPerSQL 100
# Insert data directly without creating tables
java -jar target/taosdemo-2.0.1-jar-with-dependencies.jar -host <hostname> -database <db name> -doCreateTable false -superTableSQL "create table weather(ts timestamp, f1 int) tags(t1 nchar(4))" -numOfTables 1000 -numOfRowsPerTable 100000000 -numOfThreadsForInsert 10 -numOfTablesPerSQL 10 -numOfValuesPerSQL 100

If you encounter the error Exception in thread "main" java.lang.UnsatisfiedLinkError: no taos in java.library.path, please check whether the TDengine client package is installed or TDengine is compiled and installed. If you are sure it is installed and still encounter this error, you can add -Djava.library.path=/usr/lib after the java command to specify the path to the shared library.