Bug #7669 solved. sandwich_build_7
authormentlicher@netbeans.org
Mon, 18 Sep 2000 09:00:29 +0000
changeset 342455260c18837
parent 341 de61261ee621
child 343 1d52db7f7008
Bug #7669 solved.
Exeption will not occure if the process is not created.
Win95/98 detection.
vcscvs/src/org/netbeans/modules/vcs/cmdline/passwd/CVSPasswd.java
     1.1 --- a/vcscvs/src/org/netbeans/modules/vcs/cmdline/passwd/CVSPasswd.java	Wed Sep 13 09:42:11 2000 +0000
     1.2 +++ b/vcscvs/src/org/netbeans/modules/vcs/cmdline/passwd/CVSPasswd.java	Mon Sep 18 09:00:29 2000 +0000
     1.3 @@ -116,13 +116,18 @@
     1.4   */
     1.5      public String getHome() {
     1.6          if (Utilities.isWindows()) {
     1.7 -           Process proc=null;
     1.8 -           Thread stdoutThread=null;
     1.9 -           Thread stderrThread=null;
    1.10 +            int os = Utilities.getOperatingSystem();
    1.11 +            String cmd = "cmd /c";
    1.12 +            if (os == Utilities.OS_WIN95 || os == Utilities.OS_WIN98) {
    1.13 +                cmd = "command";
    1.14 +            }
    1.15 +            Process proc=null;
    1.16 +            Thread stdoutThread=null;
    1.17 +            Thread stderrThread=null;
    1.18              try {    
    1.19                  try {
    1.20                      String loc = File.separator + "modules" + File.separator + "cvs.jar";
    1.21 -                    String command = "cmd /c \"java -DHOME=%HOME% -DHOMEPATH=%HOMEPATH% -DHOMEDRIVE=%HOMEDRIVE% -cp " 
    1.22 +                    String command = cmd+" \"java -DHOME=%HOME% -DHOMEPATH=%HOMEPATH% -DHOMEDRIVE=%HOMEDRIVE% -cp " 
    1.23                      + System.getProperty("netbeans.user") +  loc 
    1.24                      + File.pathSeparator + System.getProperty("netbeans.home") + loc
    1.25                      + " org.netbeans.modules.vcs.cmdline.passwd.ExternalCheckHome \"";
    1.26 @@ -130,6 +135,7 @@
    1.27                  } catch (IOException e){
    1.28                      D("Runtime.exec failed."); // NOI18N
    1.29                      homeDir = System.getProperty("user.home");
    1.30 +                    return homeDir;
    1.31                  }
    1.32                  final BufferedReader out = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    1.33                  stdoutThread = new Thread(