get file version

I

ilya

Is there the way to get the File Version of Product Version of the
file using java.(for all operation systems)?
 
I

ilya

Sorry, but I need the way how to get the file version. For which files
I will decide later. Now I need only for *.dll files.!!!
 
R

Roedy Green

Is there the way to get the File Version of Product Version of the
file using java.(for all operation systems)?
you can get the version of java.exe you are using by looking at the
System properties. See http://mindprod.com/applet/wassup.html for
sample code.

Young males are not exactly known for their housekeeping skill. These
creatures who live on stale pizza, and soft drinks designed the file
"system" in the various OSes.

It is a hopeless mess.

1. It does not keep track of what sort of data is in a file.

2. it has no clean way of knowing what programs can process it.

3. It has no universal way of tracking which layout version a file is.

4. It does not track what sort of encoding is used in a text file.

All you can really do is read up on the spec for each file type of
interest, and read the header in binary and pick out the data you
need.

For example see the code at:

http://wush.net/svn/mindprod/com/mindprod/common11/ImageInfo.java
 
R

Roedy Green

Sorry, but I need the way how to get the file version. For which files
I will decide later. Now I need only for *.dll files.!!!

Here are two approaches.

1. load the DLL in C++ and use some C++ Windows method to get its file
version.

2. Find a DLL layout spec and find out where they hide the version
bits. Navigate to them and extract them.

If you are stuck, I could do this for you for a fee.
 
M

Martin Gregorie

Young males are not exactly known for their housekeeping skill. These
creatures who live on stale pizza, and soft drinks designed the file
"system" in the various OSes.

It is a hopeless mess.

1. It does not keep track of what sort of data is in a file.

2. it has no clean way of knowing what programs can process it.

3. It has no universal way of tracking which layout version a file is.

4. It does not track what sort of encoding is used in a text file.
That's not strictly true. I know a two or possibly three OS which keep
track of all that good stuff (VME/B, OS/400 and possibly OS X).

Though its true that the most common OSen (Linux, Unices, DOS/Windows -
don't know how IBM big iron does it) rely on personal knowledge or
kludges such as MIMETYPE tables or proprietary equivalents.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top