I have the current import :
import com.test.test1.ver4.commons.{HelloWorld=> SomeCommon}
then I use the following:
val myCommons=Reader.getClassesForPackage(classOf[SomeCommon].getPackage) //The Reader expects for the Package
I want to change the 'ver4' to by dynamic, allowing to pass any other version as well.
I tried doing the simplest thing - getting the package by writing the following:
val p =Package.getPackage("com.test.test1.ver4.commons.HelloWorld"))
but I keep getting null.
I tried printing all the packages with :
val p = Package.getPackages()
for(pac <- p) println(pac.getName())
but it seems that it includes only 'system' packages like:
java.nio
java.security.cert
java.util.zip
java.nio.file
Can someone advise what to do?
Tahnks a lot.