From af9e38b522d8324cea961f0fc8da1a6f38e1b224 Mon Sep 17 00:00:00 2001 From: zyyang Date: Tue, 5 Jan 2021 14:33:11 +0800 Subject: [PATCH] change --- tests/examples/JDBC/JDBCDemo/readme.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/examples/JDBC/JDBCDemo/readme.md b/tests/examples/JDBC/JDBCDemo/readme.md index a138d8f131..b799ff82fc 100644 --- a/tests/examples/JDBC/JDBCDemo/readme.md +++ b/tests/examples/JDBC/JDBCDemo/readme.md @@ -21,21 +21,18 @@ mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcDemo" -De ``` ## Compile the Demo Code and Run It -To compile the demo project, go to the source directory ``TDengine/tests/examples/JDBC/JDBCDemo`` and execute +To compile taos-jdbcdriver, go to the source directory ``TDengine/src/connector/jdbc`` and execute ``` -cd TDengine/src/connector/jdbc - mvn clean package -Dmaven.test.skip=true +``` -cp target/taos-jdbcdriver-2.0.x-dist.jar ../../../tests/examples/JDBC/JDBCDemo/target/ - -cd ../../../tests/examples/JDBC/JDBCDemo - +To compile the demo project, go to the source directory ``TDengine/tests/examples/JDBC/JDBCDemo`` and execute +``` mvn clean package assembly:single ``` -To run it, go to ``TDengine/tests/examples/JDBC/JDBCDemo/target`` and execute +To run JDBCDemo.jar, go to ``TDengine/tests/examples/JDBC/JDBCDemo`` and execute ``` -java -Djava.ext.dirs=.:$JAVA_HOME/jre/lib/ext -jar JDBCDemo-SNAPSHOT-jar-with-dependencies.jar -host localhost +java -Djava.ext.dirs=../../../../src/connector/jdbc/target:$JAVA_HOME/jre/lib/ext -jar target/JDBCDemo-SNAPSHOT-jar-with-dependencies.jar -host [HOSTNAME] ``` -- GitLab