static private boolean isValidJavaRoot(String javaRootName) { if (!GFLauncherUtils.ok(javaRootName)) return false; // look for ${javaRootName}/bin/java[.exe] File f = new File(javaRootName); if (GFLauncherUtils.isWindows()) f = new File(f, "bin/java.exe"); else f = new File(f, "bin/java"); return f.exists(); }
static private boolean isValidJavaRoot(String javaRootName) { if (!GFLauncherUtils.ok(javaRootName)) return false; // look for ${javaRootName}/bin/java[.exe] File f = new File(javaRootName); if (GFLauncherUtils.isWindows()) f = new File(f, "bin/java.exe"); else f = new File(f, "bin/java"); return f.exists(); }
static private boolean isValidJavaRoot(String javaRootName) { if (!GFLauncherUtils.ok(javaRootName)) return false; // look for ${javaRootName}/bin/java[.exe] File f = new File(javaRootName); if (GFLauncherUtils.isWindows()) f = new File(f, "bin/java.exe"); else f = new File(f, "bin/java"); return f.exists(); }
public static boolean hasToken(String s) { if (s == null) { return false; } if (GFLauncherUtils.isWindows() && hasWindowsToken(s)) { return true; } if (s.indexOf(Token.TOKEN_START) >= 0) { return true; } return false; } ///////////////////////////////////////////////////////////////////////////
public static boolean hasToken(String s) { if (s == null) { return false; } if (GFLauncherUtils.isWindows() && hasWindowsToken(s)) { return true; } if (s.indexOf(Token.TOKEN_START) >= 0) { return true; } return false; } ///////////////////////////////////////////////////////////////////////////
public static boolean hasToken(String s) { if (s == null) { return false; } if (GFLauncherUtils.isWindows() && hasWindowsToken(s)) { return true; } if (s.indexOf(Token.TOKEN_START) >= 0) { return true; } return false; } ///////////////////////////////////////////////////////////////////////////
private void setProperties(File configDir) { //Read in asenv.conf/bat and set system properties accordingly File asenv = new File(configDir, GFLauncherUtils.isWindows() ? WINDOWS_ASENV_FILENAME : UNIX_ASENV_FILENAME); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(asenv)); String line; while ((line = reader.readLine()) != null) { setProperty(line); } } catch (Exception ex) { // Nothing to do } finally { try { if (reader != null) { reader.close(); } } catch (Exception ex) { } } }
boolean setJavaExecutableIfValid(String filename) { if (!GFLauncherUtils.ok(filename)) { return false; } File f = new File(filename); if (!f.isDirectory()) { return false; } if (GFLauncherUtils.isWindows()) { f = new File(f, "bin/java.exe"); } else { f = new File(f, "bin/java"); } if (f.exists()) { javaExe = SmartFile.sanitize(f).getPath(); return true; } return false; }
private void setProperties(File configDir) { //Read in asenv.conf/bat and set system properties accordingly File asenv = new File(configDir, GFLauncherUtils.isWindows() ? WINDOWS_ASENV_FILENAME : UNIX_ASENV_FILENAME); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(asenv)); String line; while ((line = reader.readLine()) != null) { setProperty(line); } } catch (Exception ex) { // TODO } finally { try { if (reader != null) { reader.close(); } } catch (Exception ex) { } } }
private void setProperties(File configDir) { //Read in asenv.conf/bat and set system properties accordingly File asenv = new File(configDir, GFLauncherUtils.isWindows() ? WINDOWS_ASENV_FILENAME : UNIX_ASENV_FILENAME); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(asenv)); String line; while ((line = reader.readLine()) != null) { setProperty(line); } } catch (Exception ex) { // Nothing to do } finally { try { if (reader != null) { reader.close(); } } catch (Exception ex) { } } }
private void convert(String oldPath) { if (GFLauncherUtils.isWindows()) convertWindows(oldPath); else convertNix(oldPath); }
private void convert(String oldPath) { if (GFLauncherUtils.isWindows()) convertWindows(oldPath); else convertNix(oldPath); }
private void convert(String oldPath) { if (GFLauncherUtils.isWindows()) convertWindows(oldPath); else convertNix(oldPath); }
String rhs = (line.substring(pos + 1)).trim(); if (GFLauncherUtils.isWindows()) { //trim off the "set " lhs = (lhs.substring(3)).trim();
String rhs = (line.substring(pos + 1)).trim(); if (GFLauncherUtils.isWindows()) { //trim off the "set " lhs = (lhs.substring(3)).trim();
String rhs = (line.substring(pos + 1)).trim(); if (GFLauncherUtils.isWindows()) { //trim off the "set " lhs = (lhs.substring(3)).trim();