net.sourceforge.jnlp

## Class JARDesc

- java.lang.Object
- - net.sourceforge.jnlp.JARDesc

-     public class JARDesc
      extends java.lang.Object

  The JAR element.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JARDesc(java.net.URL location, Version version, java.lang.String part, boolean lazy, boolean main, boolean nativeJar, boolean cacheable)` Create a JAR descriptor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.net.URL` | `getLocation()` Returns the URL of the JAR file.
    `java.lang.String` | `getPart()` Returns the part name, or null if not specified in the JNLP file.
    `Version` | `getVersion()` Returns the required version of the JAR file.
    `boolean` | `isCacheable()` Returns if this jar is cacheable
    `boolean` | `isEager()` Returns true if the JAR file should be downloaded before starting the application.
    `boolean` | `isLazy()` Returns true if the JAR file should be downloaded on demand.
    `boolean` | `isMain()` Returns true if the JNLP file defined this JAR as containing the main class.
    `boolean` | `isNative()` Returns true if the JAR file contains native code libraries.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JARDesc

          public JARDesc(java.net.URL location,
                 Version version,
                 java.lang.String part,
                 boolean lazy,
                 boolean main,
                 boolean nativeJar,
                 boolean cacheable)

      Create a JAR descriptor.
      Parameters:
        `location` - the location of the JAR file
        `version` - the required JAR versions, or null
        `part` - the part name, or null
        `lazy` - whether to load the JAR on demand
        `main` - whether the JAR contains the main class
        `nativeJar` - whether the JAR contains native libraries
        `cacheable` - whether the JAR can be cached or not

  - ### Method Detail

    - #### getLocation

          public java.net.URL getLocation()

      Returns the URL of the JAR file.

    - #### getVersion

          public Version getVersion()

      Returns the required version of the JAR file.

    - #### getPart

          public java.lang.String getPart()

      Returns the part name, or null if not specified in the JNLP file.

    - #### isNative

          public boolean isNative()

      Returns true if the JAR file contains native code libraries.

    - #### isEager

          public boolean isEager()

      Returns true if the JAR file should be downloaded before starting the application.

    - #### isLazy

          public boolean isLazy()

      Returns true if the JAR file should be downloaded on demand.

    - #### isMain

          public boolean isMain()

      Returns true if the JNLP file defined this JAR as containing the main class. If no JARs were defined as the main JAR then the first JAR should be used to locate the main class.
      See Also:
        `ResourcesDesc.getMainJAR()`

    - #### isCacheable

          public boolean isCacheable()

      Returns if this jar is cacheable
      Returns:
        Whether or not this jar is cacheable

Submit a bug or feature