I don't understand the question. If I add the folder /java/classes/ to the classpath then everything under there is on the classpath. If you had /java/classes/my/package/A.class and looked for my.package.A you'd find it. If you just looked for A then you wouldn't. What am I not understanding?
sorry. youre right about packages (like in jars).
what if you arent using packages?
root
root/1/a.class
root/1/b.class
root/2/c.class
root/2/d.class
root/3/e.class
root/3/f.class
instead of doing
java -cp root;root/1;root/2;root/3 Program
is there a
java -cp (everything in root) Program
> Then you're outta luck. Why are you not using packages?
eh. its not a big deal. im just prototyping this idea (a home project) and whipping something up that will be in flux for a while.
anyway, itll require a bunch of folders (the number of which will change a lot). so instead of jarring the project every night or having some obnoxious list of classpaths i was hoping there was a lazy option ; )
java -cp (oh hell just grab everything) Program
> Haha, not a totally bad idea actually.
> But if i went that route couldnt I just use a
> URLClassloader to load the classes directly rather
> than create the BAT and all that.
Yes you could. Why do you want to add the classes to the classpath? What's the design? Is it a plugin type of thing?
I think it will be hard to implement if you allow several "roots" at different depths. How will you know if a folder is a root, or part of a package name?
Kaj