Peng Ge

Greenhorn
+ Follow
since May 20, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Peng Ge

Rob Spoor wrote:I've never used JNA, so not really. But why can't you do this in JNI? That's like JNA but coded in C, C++ or another language that isn't Java.



Yes, But I dont know how to program in C. Seems JNI is much complicated than JNA. Can you help me with the code?
I just want to read file version.
11 years ago

Rob Spoor wrote:There are two possible ways, neither of them is portable since this kind of information is not available on all systems:
1) use JNI. GetFileVersionInfo or GetFileVersionInfoEx are probably the native API calls you need.
2) call some external program that returns this information using Runtime.exec or ProcessBuilder. I don't know any such program though.


Yes, I tried JNA. But I get runtime ERRORs.
It is hard for me to mapping the data type.
Can you please help me?
11 years ago
How to use java to get file version?
windows exe file.
11 years ago