Salome HOME
Cancel operation work correctly in the case of empty title of the document on the...
[tools/siman.git] / Workspace / Siman / src / test / Test.java
1 package test;
2
3 import org.splat.launcher.FileTransfer;
4 import org.splat.launcher.WindowsRegistry;
5
6
7 public class Test {
8
9
10 //  ==============================================================================================================================
11 //  Main
12 //  ==============================================================================================================================
13
14         public static void main(String[] args) {
15 //  --------------------------------------
16 //    String  url      = "http://localhost:8080/repository/2011/PLM110001/1.Study";
17       String  command  = args[0];
18 //    String  filename = args[1];
19
20           String  applikey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Applications\\"   + command;
21           String  key      = "";
22       String              module = WindowsRegistry.readValue(applikey + "\\shell\\open\\command ", key);
23       if (module == null) module = WindowsRegistry.readValue(applikey + "\\shell\\edit\\command ", key);
24       try {
25 //      FileTransfer.Download(url, filename, path);
26         String[] parse = module.split("/");       // Removing eventual options
27
28         Runtime.getRuntime().exec(parse[0]);
29 //      Runtime.getRuntime().exec(parse[0] + " \"" + path + "\\" + filename + "\"");
30       }
31       catch (Exception error) {
32         System.out.println("Unable to start " + module);
33      }
34     }
35 }