I want to check the version of a file, so the client knows whether or not to download the new updated client. The file is located at http://javahost.ws/files/zamorak/zamorak.jar
Printable View
I want to check the version of a file, so the client knows whether or not to download the new updated client. The file is located at http://javahost.ws/files/zamorak/zamorak.jar
Do you have any specific questions about your problemt?
Please post your code and any questions about problems you are having.
I dont know how to start.
What is a file version?
Is it something created by the OS like Date last modified?
Is it in the contents of the file?
Is it in the filename?
You'll need to know that before you can get a file's version. Then you'll need some way to determine if one file's version is newer than anothers.
Last modified date would be best I suppose.
You can get that with a method of the File class.
How?
Start by reading the API doc for the File class and finding the method to use.
Then use that method in a program.
The API doc: Java Platform SE 7