Class ApplicationDesc
java.lang.Object
net.adoptopenjdk.icedteaweb.jnlp.element.application.ApplicationDesc
- All Implemented Interfaces:
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringContains an ordered list of arguments for the application.static final Stringprivate final StringFor Java applications this method returns the name of the class containing the public static void main(String[]) method.static final Stringprivate final StringThe name of a class containing an implementation of theDownloadServiceListenerinterface of applications.private final ApplicationTypeThe type of application supported by the JNLP Client. -
Constructor Summary
ConstructorsConstructorDescriptionApplicationDesc(String mainClass, String[] arguments) Creates an application descriptor element.ApplicationDesc(ApplicationType type, String mainClass, String[] arguments) Creates an application descriptor element.ApplicationDesc(ApplicationType type, String mainClass, String progressClass, String[] arguments) Creates an application descriptor element. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgument(String argument) Add an argument to the end of the ordered list of arguments.String[]Contains an ordered list of arguments for the application.For Java applications this method returns the name of the class containing the public static void main(String[]) method.The name of a class containing an implementation of theDownloadServiceListenerinterface of applications.getType()
-
Field Details
-
APPLICATION_DESC_ELEMENT
- See Also:
-
JAVAFX_DESC_ELEMENT
- See Also:
-
ARGUMENT_ELEMENT
- See Also:
-
PROGRESS_CLASS_ATTRIBUTE
- See Also:
-
type
The type of application supported by the JNLP Client. The optional attribute indicates the type of application contained in the resources and identified by the main-class attribute. The default value isApplicationType.JAVA. If given the type attribute value is not supported by the JNLP Client, the launch should be aborted. If a JNLP Client supports other types of applications (such as "JavaFX", or "JRuby"), The meaning and/or use of the other application-desc attributes (main-class and progress-class) and sub-elements (argument and param) may vary as is appropriate for that type of application. -
mainClass
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. -
progressClass
The name of a class containing an implementation of theDownloadServiceListenerinterface of applications. May be used to indicate download progress. -
arguments
-
-
Constructor Details
-
ApplicationDesc
-
ApplicationDesc
Creates an application descriptor element.- Parameters:
type- the type of application supported by the JNLP ClientmainClass- the fully qualified name of the class containing the main method of the applicationarguments- 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 ClientmainClass- the fully qualified name of the class containing the main method of the applicationprogressClass- the fully qualified name of the class containing an implementation of theDownloadServiceListenerinterfacearguments- the arguments
-
-
Method Details
-
getType
- Returns:
- the type of application supported by the JNLP Client
-
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:
getMainClassin interfaceEntryPoint- Returns:
- the fully qualified name of the class containing the main method of the application
-
getProgressClass
The name of a class containing an implementation of theDownloadServiceListenerinterface of applications.- Returns:
- the fully qualified name of the class containing an implementation of the
DownloadServiceListenerinterface
-
getArguments
Contains an ordered list of arguments for the application.- Returns:
- the arguments
-
addArgument
Add an argument to the end of the ordered list of arguments.- Parameters:
argument- argument of command
-