public SearchState findFileForLoad(String file) { if (Platform.IS_WINDOWS) { file = file.replace('\\', '/'); } // Even if we don't support .so, some stdlib require .so directly. // Replace it with .jar to look for a java extension // JRUBY-5033: The ExtensionSearcher will locate C exts, too, this way. if (file.endsWith(".so")) { file = file.substring(0, file.length() - 3) + ".jar"; } SearchState state = new SearchState(file); state.prepareRequireSearch(file); findLibraryBySearchState(state); return state; }
public SearchState findFileForLoad(String file) { if (Platform.IS_WINDOWS) { file = file.replace('\\', '/'); } // Even if we don't support .so, some stdlib require .so directly. // Replace it with .jar to look for a java extension // JRUBY-5033: The ExtensionSearcher will locate C exts, too, this way. if (file.endsWith(".so")) { file = file.substring(0, file.length() - 3) + ".jar"; } SearchState state = new SearchState(file); state.prepareRequireSearch(file); findLibraryBySearchState(state); return state; }
public SearchState findFileForLoad(String file) { if (Platform.IS_WINDOWS) { file = file.replace('\\', '/'); } // Even if we don't support .so, some stdlib require .so directly. // Replace it with .jar to look for a java extension // JRUBY-5033: The ExtensionSearcher will locate C exts, too, this way. if (file.endsWith(".so")) { file = file.replaceAll(".so$", ".jar"); } SearchState state = new SearchState(file); state.prepareRequireSearch(file); for (LoadSearcher searcher : searchers) { if (searcher.shouldTrySearch(state)) { if (!searcher.trySearch(state)) { return null; } } } return state; }
public SearchState findFileForLoad(String file) { if (Platform.IS_WINDOWS) { file = file.replace('\\', '/'); } // Even if we don't support .so, some stdlib require .so directly. // Replace it with .jar to look for a java extension // JRUBY-5033: The ExtensionSearcher will locate C exts, too, this way. if (file.endsWith(".so")) { file = file.replaceAll(".so$", ".jar"); } SearchState state = new SearchState(file); state.prepareRequireSearch(file); for (LoadSearcher searcher : searchers) { if (searcher.shouldTrySearch(state)) { if (!searcher.trySearch(state)) { return null; } } } return state; }