Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

Latest commit

 

History

History

tasks-jdbc

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Tasks - JDBC

A project containing basic examples using Java Database Connectivity JDBC. These are just examples for understanding JDBC workflow and basic API and should NOT be used in any production application. As some critical accepts of production environment, like connection pool, proper exception handling, etc. are not handled.

Run

To build

gradle build

To clean and compile

gradle clean build

To execute -

gradle run -DmainClass="class-path-to-main"

Here, class-path-to-main is fully qualified class path to a class containing to public static void main(String []args) method. For example -

gradle run -DmainClass="edu.utd.dspl.InitialExample"
gradle -q --console plain run -DmainClass="edu.utd.dspl.tasks.PreparedStatementExample"
gradle -q --console plain run -DmainClass="edu.utd.dspl.tasks.TransactionExample"

Here, -q sets the logging level of gradle to QUITE and --console plain sets the console level to plain console. Combination of these two sets stops gradle related information in between user input. More at https://docs.gradle.org/current/userguide/gradle_command_line.html

Reference