diff --git a/tests/examples/JDBC/JDBCDemo/readme.md b/tests/examples/JDBC/JDBCDemo/readme.md index a138d8f131f613f50026e4fd5e0061cf242ef504..b799ff82fc5bfc28b0765c7a741910c3e71dd11d 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] ```