SqlExecuter vs JDBC

public class CmdExec {

	public static void main(String argv[]) {
	           executeSql();
	  
	}
	private static void executeSql() {
	    final class SqlExecuter extends SQLExec {
	        public SqlExecuter() {
	            Project project = new Project();
	            project.init();
	            setProject(project);
	           // setTaskType("sql");
	            setTaskName("sql");
	        }
	    }

	    SqlExecuter executer = new SqlExecuter();
	    executer.setSrc(new File("/home/admin/Obama/scripfile.sql"));
	    executer.setDriver("com.mysql.jdbc.Driver");
	    executer.setPassword("root");
	    executer.setUserid("root");
	    executer.setUrl("jdbc:mysql://localhost:3306/Central_Share");
	    executer.execute();
	}
	
	}
//add dependency 
 <dependency>
        <groupId>izpack</groupId>
        <artifactId>izpack-standalone-compiler</artifactId>
        <version>3.7.2</version>
      </dependency>
Advertisements

About lorddisk

WebCenter Content, WebCenter Portal, WebCenter Sites,Weblogic, Identity and Access Management (IAM),SSO,OAM,OIM,OAAM,OUD, OPAM,OID, OVD ,Oracle API Gateway ,OBIEE,OEDQ, Oracle ADF, Oracle SOA,J2EE, CackePHP ,PHP,J2SE,J2EE,Spring,Hibernate,JQuery,CSS,Java Script ,Joomla,Drupal,Worpress
This entry was posted in java, jdbc, mysql. Bookmark the permalink.