Determining the size of a Java download

1

If I download a Java application via a JNLP file, I think it then downloads something else too since the JNLP file is tiny. How can I find out how large this download actually is?

Casebash

Posted 2010-03-24T23:17:25.497

Reputation: 5 677

Answers

3

To know the size of a Java program which has been already downloaded with the Jnlp, you can open the Java Cache Viewer:

  1. Open the Control Panel.
  2. Double click on the Java icon. The Java Control Panel opens.
  3. Select the General tab.
  4. Click View. The Java Cache Viewer opens.

java cache viewer

In this viewer, you can find the size of each of the applications you installed via JNLP.


Also, to add to davr's answer, an extract from the JNLP file syntax:

By default, jar and nativelib resources will be downloaded eagerly, i.e., they are downloaded and available locally to the JVM running the application before the application is launched. The jar and nativelib elements also allow a resource to be specified as lazy. This means the resource does not have to be downloaded onto the client system before the application is launched.

The download attribute is used to control whether a resource is downloaded eagerly or lazily. For example:

<jar href="sound.jar" download="lazy"/> 
<nativelib href="native-sound.jar" download="eager"/>

If you don't have the "download" argument for the jar described, it will default to "eagerly", as described earlier. So you can be sure that all jars which don't contain "lazy" will be downloaded prior to launching the app. You can then estimate the download size with all of them. "Lazy" ones, though, can be loaded afterwards.

Gnoupi

Posted 2010-03-24T23:17:25.497

Reputation: 7 909

1

That's correct, the JNLP is just a small text file telling Java where to download the actual application files. Sorry I don't know how to determine the size in an easy way, besides opening up the JNLP file in notepad, and manually downloading the files to see how big they are.

davr

Posted 2010-03-24T23:17:25.497

Reputation: 4 809

Thanks, I opened the JNLP, but it had references to many JAR files. I can get the individual sizes, but I don't know if downloads them all or not. – Casebash – 2010-03-25T00:42:33.213