I am crating runnable jar file from eclipse, my requirement is jar don't have any properties file like log4j.properties
and config.properties
but when I am creating jar from bellow code my jar contains both properties file,
So, how can I create jar file without this properties file?
public class HadoopFileCreation1 {
public final static Logger logger = Logger.getLogger(HadoopFileCreation1.class);
public String fileName = null;
static Properties prop = new Properties();
public static void main(String[] args) {
try {
System.out.println("---------START------------");
PropertyConfigurator.configure("properties/log4j.properties");
HadoopFileCreation1 hfc = new HadoopFileCreation1();
hfc.readProperty();
hfc.writeDATFileForHadoop("PORT", getPropValues("START_TIME"));
hfc.writeDATFileForHadoop("VLAN", getPropValues("START_TIME"));
System.out.println("---------END------------");
} catch (Exception e) {
e.printStackTrace();
logger.error(e.getMessage());
}
}
public void readProperty() {
try {
prop = new Properties();
String propFileName = "properties/config.properties";
File file = new File(propFileName);
FileInputStream inputStream = new FileInputStream(file);
prop.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
logger.error(e.getMessage());
}
}
}