String dir = "";
try {
dir = URLDecoder.decode(KafkaConsumerConfig.class.getClassLoader()
.getResource("").getPath(), "utf-8");
System.out.println("dir:" + dir);
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.setProperty("java.security.auth.login.config", dir
+ "kafka_client_jaas.conf");