I recently pickup Java so I have very limited knowledge, but I would like to know if it’s possible to get DLL version using Java. If it is not possible, is it possible to use C# to get Jar version through the manifest file?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s certainly possible in each case – you just need to write code to read the appropriate file format.
I suspect it’s vastly simpler to find the manifest in a jar file from C# than the assembly version from Java though – it’s just a case of loading a zip file and finding the
META-INF/MANIFEST.MFfile. Reading the file is easy, as it’s plain text.Depending on exactly what you mean by the version of a DLL, you may need to do all manner of things – if you’re talking about .NET assembly attributes, I don’t know whether they’re placed in some easily-fetchable place; my experience of parsing Portable Executable (PE) files is that it’s slightly tricky unless you’ve got library support. Of course if you can find a Java library which knows the format already, it may become trivial…