java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.application.ApplicationDesc
All Implemented Interfaces:
EntryPoint

public class ApplicationDesc extends Object implements EntryPoint
The application-desc element contains all information needed to launch an application, given the resources described by the resources element. A JNLP file is an application descriptor if the application-desc element is specified.
Author:
Jon A. Maxwell (JAM) - initial author
  • Field Details

  • Constructor Details

    • ApplicationDesc

      public ApplicationDesc(String mainClass, String[] arguments)
      Creates an application descriptor element.
      Parameters:
      mainClass - the fully qualified name of the class containing the main method of the application
      arguments - the arguments
    • ApplicationDesc

      public ApplicationDesc(ApplicationType type, String mainClass, String[] arguments)
      Creates an application descriptor element.
      Parameters:
      type - the type of application supported by the JNLP Client
      mainClass - the fully qualified name of the class containing the main method of the application
      arguments - the arguments
    • ApplicationDesc

      public ApplicationDesc(ApplicationType type, String mainClass, String progressClass, String[] arguments)
      Creates an application descriptor element.
      Parameters:
      type - the type of application supported by the JNLP Client
      mainClass - the fully qualified name of the class containing the main method of the application
      progressClass - the fully qualified name of the class containing an implementation of the DownloadServiceListener interface
      arguments - the arguments
  • Method Details

    • getType

      public ApplicationType getType()
      Returns:
      the type of application supported by the JNLP Client
    • getMainClass

      public String getMainClass()
      For Java applications this method returns the name of the class containing the public static void main(String[]) method. The name and/or meaning may vary as is appropriate for other types of applications.

      This attribute can be omitted if the main class can be found from the Main-Class manifest entry in the main JAR file.

      Specified by:
      getMainClass in interface EntryPoint
      Returns:
      the fully qualified name of the class containing the main method of the application
    • getProgressClass

      public String getProgressClass()
      The name of a class containing an implementation of the DownloadServiceListener interface of applications.
      Returns:
      the fully qualified name of the class containing an implementation of the DownloadServiceListener interface
    • getArguments

      public String[] getArguments()
      Contains an ordered list of arguments for the application.
      Returns:
      the arguments
    • addArgument

      public void addArgument(String argument)
      Add an argument to the end of the ordered list of arguments.
      Parameters:
      argument - argument of command