Jnlp program arguments




















The following example specifically matches "Windows 8" and "Windows 10":. The resources element has six different possible subelements: jar , nativelib , j2se , property , package , and extension. The package and extension elements are not discussed in this developer's guide. A jar element specifies a JAR file that is part of the application's class path.

For example:. The jar file typically contains Java classes that contain the code for the particular application, but can also contain other resources, such as icons and configuration files, that are available through the getResource mechanism. A nativelib element specifies a JAR file that contains native libraries, for example:.

The application is responsible for doing the actual call to System. Native libraries would typically be included in a resources element that is geared toward a particular operating system and architecture, for example:. By default, jar and nativelib resources are downloaded eagerly, that is, 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, lazily, or contains a custom progress implementation, for example:. If several JREs are specified, then this indicates a prioritized list of the supported JREs, with the most preferred version first, for example:.

The version attribute refers, by default, to a platform version specification version of the Java Platform Standard Edition. Currently defined platform versions are 1. A platform version does not usually contain a micro version number; for example 1.

Exact product versions implementation versions can also be specified by including the href attribute, such as 1.

For example, a request in the following the form does not consider an installed 9-ea JRE as a match for the request:. The java-vm-args attribute of the j2se element specifies a preferred set of virtual machine arguments to use when launching java. The property element defines a system property that is available through the System. It has two required attributes: name and value , for example:. Properties that are considered secure are set by Java Web Start after the VM is started but before the application is invoked.

The following properties are considered secure:. Properties set in an unsigned JNLP file that are prefixed with one of the following strings: jnlp. The application-desc element indicates that the JNLP file is launching an application as opposed to an applet.

The application element has an optional attribute, main-class , for specifying the name of the application's main class, which is the class where execution must begin:. For Java applications, the main class is the class that contains the public static void main String argv[] method. For JavaFX applications, the main class is the class that extends javafx.

The optional type attribute can be used to indicate the type of application, either Java, which is the default, or JavaFX. Arguments can be specified for the application by including one or more nested argument elements, for example:. Parameters can be added to applications with the type attribute set to JavaFX just as in applets by including one or more param elements, for example:. The optional progress-class attribute can be used to indicate that the class of this name implements the javax.

DownloadServiceListener interface. This class can be loaded first and used to indicate the progress of other resources being downloaded and verified. Java Web Start has support for launching Java applets. This support provides easy migration of existing code to Java Web Start.

An applet is launched using the applet-desc element instead of the application-desc element, for example:. The JAR files that make up the applet are described using the resources element, the same as for applications. The rest of the attributes correspond to the respective HTML applet tag elements. The main-class attribute is used instead of the code attribute. The main-class attribute is assigned the name of the Applet class without the. This attribute can be omitted if the Applet class can be found from the Main-Class manifest entry in the main JAR file.

The component-desc element denotes that this JNLP file is not an application or an applet but an extension that can be used as a resource in an application, applet, or another extension.

A component extension is typically used to factor out a set of resources that are shared among multiple applications or that have separate security needs. The installer-desc element denotes that this JNLP file is an installer extension that defines an application that will be run only once, the first time this extension JNLP file is used in an application, applet, or another extension.

An installer extension is typically used to install platform-specific native code that requires a more complicated setup than simply loading a native library into the VM. Valid values are 1. Yes information Contains other elements that describe the application and its source. No title Specifies the title of the application. NA No vendor Specifies the provider of the application. NA No homepage Home page of the application.

No description Short statement describing the application. Valid values are one-line , short , and tooltip. No icon Describes an icon that can be used to identify the application to the user. Valid values are default , splash , and shortcut. No offline-allowed Indicates that this application can operate when the client system is disconnected from the network.

NA No shortcut Can be used to indicate an application's preferences for desktop integration. If the value is true , then the application prefers to be considered installed. The default value of the install attribute is false. On Windows, this determines if the application appears in the Add and Remove Programs panel. Added in 7. No desktop Can be used to indicate an application's preference for putting a shortcut on the users desktop. No association Can be used to hint to the JNLP client that it wants to be registered with the operating system as the primary handler of certain extensions and a certain MIME type.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.

Learn more. Ask Question. Asked 5 years, 3 months ago. Active 3 years, 10 months ago. Viewed 2k times. My JNLP file is not dynamically built. It is a static file. My questions are: What code do I have to write at my Swing program? How should I pass the values from the servlet? Improve this question. Snozzlebert 3 3 silver badges 18 18 bronze badges. Jayanta Pramanik Jayanta Pramanik 51 7 7 bronze badges.

One generally starts a Java WebStart application by clicking on a link in a web browser. Depending on configuration, desktop shortcuts may be installed to speed up subsequent launches, and cached applications can also be launched from within the WebStart control panel. For example, the full path to the 1. In older versions of the JDK, this was also the default behavior for the command if no arguments were given.

This wins points for generality, but will also bring the web browser back into the picture. The open command hands the URL to the default web browser, which will then invoke WebStart as a helper app, just as if you had clicked on a link to the jnlp file.



0コメント

  • 1000 / 1000