Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected "Class Foo in invalid directory" error #6

Open
ctrueden opened this issue Mar 2, 2015 · 2 comments
Open

Unexpected "Class Foo in invalid directory" error #6

ctrueden opened this issue Mar 2, 2015 · 2 comments
Milestone

Comments

@ctrueden
Copy link
Member

ctrueden commented Mar 2, 2015

  • Open Fiji's Script Editor
  • Paste in Red_and_Blue.java
  • Try to run it
  • On my system (OS X 10.10 with Java 1.6.0_65 and also with Java 1.8.0_11, I see:
Started Red_and_Blue.java at Sun Mar 01 22:54:01 CST 2015
javax.script.ScriptException: Class Red_And_Blue in invalid directory: /Users/curtis/Desktop/Red_and_Blue.java
    at org.scijava.plugins.scripting.java.JavaEngine.getMavenProject(JavaEngine.java:369)
    at org.scijava.plugins.scripting.java.JavaEngine.access$600(JavaEngine.java:94)
    at org.scijava.plugins.scripting.java.JavaEngine$Builder.<init>(JavaEngine.java:324)
    at org.scijava.plugins.scripting.java.JavaEngine$Builder.<init>(JavaEngine.java:267)
    at org.scijava.plugins.scripting.java.JavaEngine.eval(JavaEngine.java:149)
    at org.scijava.script.ScriptModule.run(ScriptModule.java:175)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:164)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)

Maybe something to do with the fact that we dubiously ship our own tools.jar?

@ctrueden
Copy link
Member Author

ctrueden commented Mar 2, 2015

@ctrueden
Copy link
Member Author

ctrueden commented Mar 2, 2015

This problem has something to do with that specific source file. The following Java plugin does not exhibit the problem (though it does suffer from #7 when using Java 8):

import ij.plugin.PlugIn;
import ij.IJ;

public class Bare_PlugIn implements PlugIn {
    @Override
    public void run(String arg) {
        IJ.showMessage("Hello world!");
    }
}

@ctrueden ctrueden added this to the m1 milestone Mar 23, 2015
@ctrueden ctrueden added java8 and removed java8 labels Nov 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant