1.1 --- a/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java Sat Dec 22 21:59:02 2012 +0100
1.2 +++ b/launcher/src/main/java/org/apidesign/bck2brwsr/launcher/Bck2BrwsrLauncher.java Sun Dec 23 09:17:26 2012 +0100
1.3 @@ -270,15 +270,23 @@
1.4 // return null;
1.5 // } catch (UnsupportedOperationException ex)
1.6 {
1.7 - File dir = File.createTempFile("chrome", ".dir");
1.8 - dir.delete();
1.9 - dir.mkdirs();
1.10 +// File dir = File.createTempFile("chrome", ".dir");
1.11 +// dir.delete();
1.12 +// dir.mkdirs();
1.13 +// String[] cmd = {
1.14 +// "google-chrome", "--user-data-dir=" + dir, "--app=" + uri.toString()
1.15 +// };
1.16 +// LOG.log(Level.INFO, "Launching {0}", Arrays.toString(cmd));
1.17 +// final Process process = Runtime.getRuntime().exec(cmd);
1.18 +// return new Object[] { process, dir };
1.19 + }
1.20 + {
1.21 String[] cmd = {
1.22 - "google-chrome", "--user-data-dir=" + dir, "--app=" + uri.toString()
1.23 + "xdg-open", uri.toString()
1.24 };
1.25 LOG.log(Level.INFO, "Launching {0}", Arrays.toString(cmd));
1.26 final Process process = Runtime.getRuntime().exec(cmd);
1.27 - return new Object[] { process, dir };
1.28 + return new Object[] { process, null };
1.29 }
1.30 }
1.31
1.32 @@ -311,6 +319,9 @@
1.33 }
1.34
1.35 private void deleteTree(File file) {
1.36 + if (file == null) {
1.37 + return;
1.38 + }
1.39 File[] arr = file.listFiles();
1.40 if (arr != null) {
1.41 for (File s : arr) {