> The while loop quits right away, b/c the claspath only contains one > item, whereas within eclipse the classpath is like: > > C:\some\dir; C:\some\other\dir ; C:\yet\another\dir ; etc.. > > I want to navigate into the package hierarchy that is > > ...\target\classes\my\package\hierarchy > > This works in eclipse with the approach above, but it fails with > maven. I'm not saying this is the only/best way to do this. If you > have another suggestion, please let me know. > > Regards, > Davis > > PS: Is there a plugin.properties somewhere that I can override so this > will work with Maven?
The java.class.path property isn't useful, and shouldn't be used, or relied on, at all. The only thing it shows are what class paths were available to the original parent classloader when the VM was created. Nothing more. These particular tests break under several conditions. If you use a reflective launch, (which is what happened here.) or even if your classes are packaged in a jar. The classpath would show the path to the jar, not a path to a directory. Whatever you need the classes hierarchy for, you should be able to design it to accomplish it with the ClassLoader object, and other bits of java.lang.reflect. It will end up being much more "tool friendly". :) -vito --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
