In Eclipse I have two projects [mainDev] and [Junit], the projects are related through the Java Build path -> Projects tab.
I would like to iterate all classes of package x in project "[mainDev]", Using junit test in [Junit] project.
I found piece if code here: http://forums.sun.com/thread.jspa?threadID=341935 that iterate on all classes (compleate code below)
But getContextClassLoader().getResource("/com/mycomp"); always returns null.
What am I doing wrong?
Thank you David , Indeed the '/' at the end made getResource work, But running this code won’t return classes from [mainDev] project
I was able to read classes in [JUnit] project under the same package name 'com.mycomp' but I was unable to get to classes in [mainDev] project