10000 Merge pull request #5 from Dokthar/substring-patch · imagej/example-legacy-plugin@d2a130c · GitHub
[go: up one dir, main page]

Skip to content

Commit d2a130c

Browse files
committed
Merge pull request #5 from Dokthar/substring-patch
make substring args less confusing
2 parents 7405f20 + 10cfab2 commit d2a130c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/Process_Pixels.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static void main(String[] args) {
176176
// set the plugins.dir property to make the plugin appear in the Plugins menu
177177
Class<?> clazz = Process_Pixels.class;
178178
String url = clazz.getResource("/" + clazz.getName().replace('.', '/') + ".class").toString();
179-
String pluginsDir = url.substring(5, url.length() - clazz.getName().length() - 6);
179+
String pluginsDir = url.substring("file:".length(), url.length() - clazz.getName().length() - ".class".length());
180180
System.setProperty("plugins.dir", pluginsDir);
181181

182182
// start ImageJ

0 commit comments

Comments
 (0)
0