本文整理汇总了Java中net.sf.launch4j.Util类的典型用法代码示例。如果您正苦于以下问题:Java Util类的具体用法?Java Util怎么用?Java Util使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Util类属于net.sf.launch4j包,在下文中一共展示了Util类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import net.sf.launch4j.Util; //导入依赖的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.Util; //导入依赖的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);
}
}
示例3: checkFile
import net.sf.launch4j.Util; //导入依赖的package包/类
public static void checkFile(File f, String property, String fileDescription) {
File cfgPath = ConfigPersister.getInstance().getConfigPath();
if (f == null
|| f.getPath().equals("")
|| (!f.exists() && !Util.getAbsoluteFile(cfgPath, f).exists())) {
signalViolation(property,
Messages.getString("Validator.doesnt.exist", fileDescription));
}
}
示例4: Props
import net.sf.launch4j.Util; //导入依赖的package包/类
public Props(File f) throws IOException {
FileInputStream is = null;
try {
is = new FileInputStream(f);
_properties.load(is);
} finally {
Util.close(is);
}
}