Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-dev] canonical way to handle optional dependencies

Hello,

(Not sure this is on topic for the list - but not sure where to ask.)

What is the canonical way to check if an optional dependency is available?

I know of a couple of methods:

1. wrapping code in try/catch and catching something wide like Throwable or NoClassDefFoundError
2. checking for bundle status (e.g. calling Platform.getBundle(symbolicName) and Bundle.getState)

Thank you.
Jonah




~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com

Back to the top