MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / addJars

Method addJars

ij/src/main/java/ij/plugin/Compiler.java:188–206  ·  view source on GitHub ↗
(String path, StringBuffer sb)

Source from the content-addressed store, hash-verified

186
187 // Adds .jar files in plugins folder, and subfolders, to the classpath
188 void addJars(String path, StringBuffer sb) {
189 String[] list = null;
190 File f = new File(path);
191 if (f.exists() && f.isDirectory())
192 list = f.list();
193 if (list==null)
194 return;
195 boolean isJarsFolder = path.endsWith("jars")|| path.endsWith("lib");
196 path = IJ.addSeparator(path);
197 for (int i=0; i<list.length; i++) {
198 File f2 = new File(path+list[i]);
199 if (f2.isDirectory())
200 addJars(path+list[i], sb);
201 else if (list[i].endsWith(".jar")&&(!list[i].contains("_")||isJarsFolder)) {
202 sb.append(File.pathSeparator+path+list[i]);
203 //IJ.log("javac classpath: "+path+list[i]);
204 }
205 }
206 }
207
208 void showErrors(String s) {
209 if (errors==null || !errors.isVisible()) {

Callers 1

getClassPathMethod · 0.95

Calls 5

addSeparatorMethod · 0.95
appendMethod · 0.65
existsMethod · 0.45
listMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected