Reputation: 4576
I'm having two modules in my project. Both the modules have different package names. I'm using the second module as a library. The problem is, when I use getPackageName()
in this second module, it returns me the package name of the first module.
How to resolve that?
Upvotes: 0
Views: 902
Reputation: 4576
The solution was simple. Using getClass().getPackage().toString()
returned me the package name of the current class and hence the current module.
Upvotes: 3