How to run windows exe and bat files using java?

This is example of run exe and batch files from java code and catch response from them in java. Then create four java files in com.narayanatutorial.main package. RunExeMain.java RunWithParamMain.java RunBatchMain.java GetResponseMain.java 1) RunExeMain.java This file run exe file (Here cmd.exe) using java program. public class RunExeMain { //This is Example that display how to run […]

7-Zip Command-Line Examples In Java

7-Zip Command-Line Examples In Java The 7za.exe program is used to compress, extract and update files through the command line. It provides superior compression. It is a great program. The 7za.exe program commands will execute through java to make files compress with password protected and without password protected, extract and update the files in the […]

What is difference between BeanFactory and ApplicationContext in Spring?

Differences Between Spring and Struts

BeanFactory Does not support the Annotation based dependency Injection. ApplicationContext Support Annotation based dependency Injection.-@Autowired, @PreDestroy BeanFactory Does not Support ApplicationContext Application contexts can publish events to beans that are registered as listeners BeanFactory Does not support way to access Message Bundle(internationalization (I18N) ApplicationContext Support internationalization (I18N) messages. BeanFactory Doesn’t support such JNDI access, EJB integration, […]

Java Reflection API

Classes and Objects interview questions

Java Reflection API Java Reflection API is a process of modifying or retrieve metadata of a class at run time. The java.lang.Class class provides methods that can be used to get metadata and change the run time behavior of a class. The java.lang and java.lang.reflect packages are providing classes for java reflection. The Java Reflection API is […]