1.4 KiB
1.4 KiB
How to Run the JDBC Demo Code On A 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.
How to run jdbcChecker
mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.JdbcChecker" -Dexec.args="-host localhost"
How to run jdbcTaosDemo
run command:
mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.jdbcTaosdemo.JdbcTaosdemo"
and run with your customed args
mvn clean compile exec:java -Dexec.mainClass="com.taosdata.example.jdbcTaosdemo.JdbcTaosdemo" -Dexec.args="-host localhost"
Compile the Demo Code and Run It
To compile the demo project, go to the source directory TDengine/tests/examples/JDBC/JDBCDemo
and execute
mvn clean package assembly:single
The pom.xml
is configured to package all the dependencies into one executable jar file.
To run it, go to examples/JDBC/JDBCDemo/target
and execute
java -jar jdbcChecker-SNAPSHOT-jar-with-dependencies.jar -host localhost