Here is the way to specify the debug configuration parameters through VM arguments in eclipse.
In VM arguments section, as you can see I have passed following debug parameter.
-Dkony.debug=true
These parameters I can read in the following way in Java.
String isdebug = System.getProperty("kony.debug");
Boolean DEBUG_MODE = new Boolean(isdebug);
if(DEBUG_MODE) {
System.out.println("My application is running in debug mode");
//Do your action here!!
}
Other sources:
http://www.avajava.com/tutorials/lessons/whats-the-difference-between-program-arguments-and-vm-arguments.html
In VM arguments section, as you can see I have passed following debug parameter.
-Dkony.debug=true
These parameters I can read in the following way in Java.
String isdebug = System.getProperty("kony.debug");
Boolean DEBUG_MODE = new Boolean(isdebug);
if(DEBUG_MODE) {
System.out.println("My application is running in debug mode");
//Do your action here!!
}
Other sources:
http://www.avajava.com/tutorials/lessons/whats-the-difference-between-program-arguments-and-vm-arguments.html
No comments:
Post a Comment