I have a 3rd party JAR that I have converted to an OSGI bundle using bnd. The code I need to call to use it from my own bundle looks something like this:
ThirdParty.setRegKey(myRegKey);
ThirdParty thirdParty = new ThirdParty();
thirdParty.callMethod();
What seems to be causing me problems is the first line - the static method call. Outside of the OSGI container, using the standard JAR, this works fine. Inside OSGI, however, I get an error at line 3 stating that no registration key has been set.
Are there any issues with static method calls across bundles like this? It's almost as if the static context is not being shared across the bundles.