Java examples for java.lang:Exception
Get current running class name
//package com.java2s; public class Main { public static boolean bootFromJunit() { StackTraceElement[] stacks = Thread.currentThread().getStackTrace(); return stacks[stacks.length - 1].getClassName().contains("junit"); }/*from www.jav a 2s . c o m*/ }