Find out dependencies for any .jar package

I am developing OSGi packages using Eclipse. I am testing code using the Eclipse OSGi runtime configuration.

The code works well here, but when I export packages as banks and try to use them in a different environment (like pax-runner), I get ClassNotFound exceptions at runtime. Ligaments are installed normally, without errors. I execute the equinox command: "diag bundle-number" and it says: "There are no unresolved restrictions" for each package.

I would like to know if there is a tool / method for this .jar package if it needs any external library that is not described in the .mf manifest.

+3
source share
5

, , Import-Package ( , Require-Bundle), . ClassNotFoundException NoClassDefFoundError, , Import-Package .

Bnd Peter Kriens. -, , Import-Package . , Bnd, ClassNotFound/NoClassDefFound, , . Class.forName().

+2

JBoss Open Source : http://jboss.org/tattletale

jar , .

+2

- ( Java .NET IKVM, Jars) JarAnalyzer, .

+1

SpringSource bundlor-shell. . JAR, , JAR. JAR , , .

, , . -, .., .

" ", - ; OSGi, . , , ClassNotFoundException.

+1

The Eclipse Plugin Development Environment (PDE) will give you compilation errors if your code uses classes that are not specified in MANIFEST.MF. ClassNotFound exceptions at runtime often occur due to incorrect labeling of package import as optional - bundles are allowed, but they will not work. Compiling with a different version of the package or package that you are using can also cause this error.

0
source

Source: https://habr.com/ru/post/1762466/


All Articles