net.sf.launch4j.ExecException Java Examples

The following examples show how to use net.sf.launch4j.ExecException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainFrame.java    From beast-mcmc with GNU Lesser General Public License v2.1 6 votes vote down vote up
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);
	}
}
 
Example #2
Source File: MainFrame.java    From PyramidShader with GNU General Public License v3.0 6 votes vote down vote up
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);
	}
}
 
Example #3
Source File: MainFrame.java    From jmkvpropedit with BSD 2-Clause "Simplified" License 6 votes vote down vote up
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);
	}
}