Note that there are some explanatory texts on larger screens.

plurals
  1. POPlayFramework2 Scala File Map
    primarykey
    data
    text
    <p>I'm just starting with Scala and have run into a problem that has me stumped, but I'm guessing that I'm missing something easy.</p> <p>I was following instructions to use the Clapper ClassFinder: <a href="http://thoughts.inphina.com/2011/09/15/building-a-plugin-based-architecture-in-scala/" rel="nofollow">http://thoughts.inphina.com/2011/09/15/building-a-plugin-based-architecture-in-scala/</a></p> <pre><code>val classpath = List("./plugins").map(new File(_)) val finder = ClassFinder(classpath) val classes = finder.getClasses val classMap = ClassFinder.classInfoMap(classes) </code></pre> <p>After executing the first line, I see that classpath is set simply to List(.\plugins) I'm running this on windows, so the swapping of the slash seems to be OK. But I expected to see a list of File objects, although I am not sure about this Scala syntax, and perhaps I'm missing something in the Scala IDE. The value for classes shows an "empty iterator".</p> <p>It seems not to be finding any files in the path that I specified. I tried using an absolute path, but I had the same results. I have a single jar file in the plugins directory that I'm hoping it will find. The plugins directory is at the root of the Play2 project I'm using.</p> <p>Edit --- I did find that when I explicitly list the path to one jar that it is able to find it:</p> <pre><code>val classpath = List("./plugins/myPlugin.jar").map(new File(_)) </code></pre> <p>But I want to find all jar files in the directory. The following didn't work:</p> <pre><code>val classpath = List("./plugins/*").map(new File(_)) </code></pre> <p>Nor did this:</p> <pre><code>val classpath = List("./plugins/*.jar").map(new File(_)) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload