Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get Assembly Version in Java

Is there any way for me to get the version of an assembly or application in Java?

For example, I have a .NET .dll file located in Program Files. I normally call `loadLibrary' on this .dll so I can invoke JNI methods in C++.

System.loadLibrary("MyJniAssembly");

Can someone point me in the right direction? Thanks.

like image 504
gwin003 Avatar asked Mar 25 '26 09:03

gwin003


1 Answers

The simplest way would be to expose that information in another native method implemented in the assembly. If you can't do it there, you'd have to create a new assembly with such a method but one that takes a parameter indicating the assembly or type you are interested in.

like image 194
Tom Blodget Avatar answered Mar 27 '26 21:03

Tom Blodget



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!