This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 196251
Collapse All | Expand All

(-)a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/HostInfoUtils.java (-1 / +5 lines)
Lines 115-121 Link Here
115
            fileExists = npb.call().waitFor() == 0;
115
            fileExists = npb.call().waitFor() == 0;
116
        }
116
        }
117
117
118
            return fileExists;
118
        return fileExists;
119
    }
119
    }
120
120
121
    public static String searchFile(ExecutionEnvironment execEnv,
121
    public static String searchFile(ExecutionEnvironment execEnv,
Lines 233-238 Link Here
233
        }
233
        }
234
    }
234
    }
235
235
236
    /* package */ static void resetHostsData(final ExecutionEnvironment env) {
237
        cache.remove(env);
238
    }
239
236
    /**
240
    /**
237
     * For testing purposes only!
241
     * For testing purposes only!
238
     */
242
     */
(-)a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/util/WindowsSupport.java (-1 / +20 lines)
Lines 47-61 Link Here
47
import java.io.OutputStreamWriter;
47
import java.io.OutputStreamWriter;
48
import java.nio.charset.Charset;
48
import java.nio.charset.Charset;
49
import java.util.List;
49
import java.util.List;
50
import java.util.concurrent.CancellationException;
50
import java.util.logging.Level;
51
import java.util.logging.Level;
51
import java.util.regex.Matcher;
52
import java.util.regex.Matcher;
52
import java.util.regex.Pattern;
53
import java.util.regex.Pattern;
54
import org.netbeans.modules.nativeexecution.api.ExecutionEnvironment;
55
import org.netbeans.modules.nativeexecution.api.ExecutionEnvironmentFactory;
53
import org.netbeans.modules.nativeexecution.api.util.ShellValidationSupport.ShellValidationStatus;
56
import org.netbeans.modules.nativeexecution.api.util.ShellValidationSupport.ShellValidationStatus;
54
import org.netbeans.modules.nativeexecution.support.Logger;
57
import org.netbeans.modules.nativeexecution.support.Logger;
55
import org.netbeans.modules.nativeexecution.api.util.Shell.ShellType;
58
import org.netbeans.modules.nativeexecution.api.util.Shell.ShellType;
56
import org.netbeans.modules.nativeexecution.support.windows.PathConverter;
59
import org.netbeans.modules.nativeexecution.support.windows.PathConverter;
57
import org.netbeans.modules.nativeexecution.support.windows.PathConverter.PathType;
60
import org.netbeans.modules.nativeexecution.support.windows.PathConverter.PathType;
58
import org.netbeans.modules.nativeexecution.support.windows.SimpleConverter;
61
import org.netbeans.modules.nativeexecution.support.windows.SimpleConverter;
62
import org.openide.util.Exceptions;
59
import org.openide.util.Utilities;
63
import org.openide.util.Utilities;
60
64
61
/**
65
/**
Lines 96-109 Link Here
96
        init(null);
100
        init(null);
97
    }
101
    }
98
102
99
    public void init(String searchDir) {
103
    public synchronized void init(String searchDir) {
100
        if (!isWindows) {
104
        if (!isWindows) {
101
            return;
105
            return;
102
        }
106
        }
103
107
104
        pathConverter = new SimpleConverter();
108
        pathConverter = new SimpleConverter();
109
110
        final ExecutionEnvironment env = ExecutionEnvironmentFactory.getLocal();
111
        boolean resetHIU = HostInfoUtils.isHostInfoAvailable(env) ? true : false;
112
        
105
        activeShell = findShell(searchDir);
113
        activeShell = findShell(searchDir);
106
        initCharset();
114
        initCharset();
115
        
116
        if (resetHIU) {
117
            HostInfoUtils.resetHostsData(env);
118
            try {
119
                HostInfoUtils.getHostInfo(env);
120
            } catch (IOException ex) {
121
                Exceptions.printStackTrace(ex);
122
            } catch (CancellationException ex) {
123
                Exceptions.printStackTrace(ex);
124
            }
125
        }
107
    }
126
    }
108
127
109
    private Shell findShell(String searchDir) {
128
    private Shell findShell(String searchDir) {

Return to bug 196251