本文整理汇总了Java中org.fest.swing.security.NoExitSecurityManagerInstaller类的典型用法代码示例。如果您正苦于以下问题:Java NoExitSecurityManagerInstaller类的具体用法?Java NoExitSecurityManagerInstaller怎么用?Java NoExitSecurityManagerInstaller使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NoExitSecurityManagerInstaller类属于org.fest.swing.security包,在下文中一共展示了NoExitSecurityManagerInstaller类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUpOnce
import org.fest.swing.security.NoExitSecurityManagerInstaller; //导入依赖的package包/类
@BeforeClass
public static void setUpOnce()
{
FailOnThreadViolationRepaintManager.install();
// Hooks up system.exit to an exception
noExitSecurityManagerInstaller = NoExitSecurityManagerInstaller.installNoExitSecurityManager();
}
示例2: before
import org.fest.swing.security.NoExitSecurityManagerInstaller; //导入依赖的package包/类
/**
* Starts BlueJ in a new thread.
*/
@Before
public void before() throws InterruptedException, InvocationTargetException {
createTempDirs();
configureJemmy();
cleaningRobot = BasicRobot.robotWithNewAwtHierarchy();
sec = NoExitSecurityManagerInstaller.installNoExitSecurityManager();
BluejExtensionEdtOfficer.install();
t = new Thread(new Runnable() {
public void run() {
File file = new File(System.getProperty("bluej-jar"));
URLClassLoader cl = null;
try {
cl = new URLClassLoader(new URL[]{file.toURI().toURL()}, null);
} catch (MalformedURLException e) {
}
Class<?> clazz = null;
try {
clazz = cl.loadClass("bluej.Boot");
} catch (ClassNotFoundException e) {
}
Method main = null;
try {
main = clazz.getMethod("main", String[].class);
} catch (NoSuchMethodException e) {
}
try {
main.invoke(null, new Object[]{new String[]{}});
} catch (Exception e) {
}
}
});
t.start();
mainFrame = new JFrameOperator("BlueJ");
}
示例3: setUpOnce
import org.fest.swing.security.NoExitSecurityManagerInstaller; //导入依赖的package包/类
@BeforeClass
public static void setUpOnce() {
FailOnThreadViolationRepaintManager.install();
noExitSecurityManagerInstaller = NoExitSecurityManagerInstaller.installNoExitSecurityManager(new ExitCallHook() {
public void exitCalled(final int status) {
Assert.assertEquals("Bad exit status", 0, status);
}
});
}