本文整理汇总了Java中net.sf.launch4j.Log类的典型用法代码示例。如果您正苦于以下问题:Java Log类的具体用法?Java Log怎么用?Java Log使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Log类属于net.sf.launch4j包,在下文中一共展示了Log类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import net.sf.launch4j.Log; //导入依赖的package包/类
public void actionPerformed(ActionEvent e) {
try {
getGlassPane().setVisible(true);
Worker.post(new Task() {
public Object run() throws ExecException {
Log log = Log.getSwingLog(_configForm.getLogTextArea());
log.clear();
String path = _outfile.getPath();
if (Util.WINDOWS_OS) {
log.append(Messages.getString("MainFrame.executing") + path);
Util.exec(new String[] { path, "--l4j-debug" }, log);
} else {
log.append(Messages.getString("MainFrame.jar.integrity.test")
+ path);
Util.exec(new String[] { "java", "-jar", path }, log);
}
return null;
}
});
} catch (Exception ex) {
// XXX errors logged by exec
} finally {
getGlassPane().setVisible(false);
}
}
示例2: actionPerformed
import net.sf.launch4j.Log; //导入依赖的package包/类
public void actionPerformed(ActionEvent e) {
try {
getGlassPane().setVisible(true);
Worker.post(new Task() {
public Object run() throws ExecException {
Log log = Log.getSwingLog(_configForm.getLogTextArea());
log.clear();
String path = _outfile.getPath();
if (Util.WINDOWS_OS) {
log.append(Messages.getString("MainFrame.executing") + path);
Util.exec(new String[] { path }, log);
} else {
log.append(Messages.getString("MainFrame.jar.integrity.test")
+ path);
Util.exec(new String[] { "java", "-jar", path }, log);
}
return null;
}
});
} catch (Exception ex) {
// XXX errors logged by exec
} finally {
getGlassPane().setVisible(false);
}
}