<div style='background-color: none transparent;'></div>
Home » » how to compile and running java program using bat file and crone tab scheduler

how to compile and running java program using bat file and crone tab scheduler

or compile and running a bat file in command prompt open command prompt cd C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\fi_sh\WEB-INF\classes then

step 1: set java home as below
set JAVA_HOME="C:\Program Files\Java\jdk1.5.0"

step 2: compile the jar files and java file as below

%JAVA_HOME%\bin\javac -classpath ../lib/company.jar;../lib/company_db.jar;../lib/project7.jar;../lib/mysql-connector-java-5.1.6-bin.jar;../lib/activation.jar;../lib/mail.jar;../lib/log4j-1.2.15.jar;../lib/smtp.jar;../lib/pop3.jar;. com/company/project/user/ChangePasswordAlert.java



step 3: for running the compiled file as below

%JAVA_HOME%\bin\java -classpath ../lib/company.jar;../lib/company_db.jar;../lib/project7.jar;../lib/mysql-connector-java-5.1.6-bin.jar;../lib/activation.jar;../lib/mail.jar;../lib/log4j-1.2.15.jar;../lib/smtp.jar;../lib/pop3.jar;. com.company.project.user.ChangePasswordAlert "en"


OR CREATE A BAT FILE AND COPY THE BELOW CONTENT IN IT AND CALL THE BAT FILE IN COMMAND PROMPT

set JAVA_HOME="C:\Program Files\Java\jdk1.5.0"

%JAVA_HOME%\bin\java -classpath ../lib/company.jar;../lib/company_db.jar;../lib/project7.jar;../lib/mysql-connector-java-5.1.6-bin.jar;../lib/activation.jar;../lib/mail.jar;../lib/log4j-1.2.15.jar;../lib/smtp.jar;../lib/pop3.jar;. com.company.project.user.ChangePasswordAlert "en"


Share this article :
 
Copyright © 2011. B.Sc B.Tech MCA Ploytechnic Mini,Main Projects | Free Main Projcets Download | MCA |B.tech . All Rights Reserved
Company Info | Contact Us | Privacy policy | Term of use | Widget | Advertise with Us | Site map
Template Modify by Creating Website. Inpire by Darkmatter Rockettheme Proudly powered by Blogger