Schlagwort: Debugging

Java: Check if your code is running in Eclipse

Sometimes, for example during debugging, it is useful to check if your code is running from the Eclipse IDE to exclude certain code from execution. How can this be done? Here is an example: public class mainClass { public static void main(String[] args) { String inEclipse = System.getProperty("ineclipse"); if ((inEclipse == null) || (!inEclipse.equals("true"))) { …

weiterlesen »