Java源码示例:net.sf.launch4j.Log
示例1
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
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);
}
}
示例3
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);
}
}