Java
is in your path:com.example.MyMainClass
. Assuming that everything the class needs to run is included in exampleApp.jar, it would run as users initialized it themselves. This file would be the equivalent of running the command:<all-permissions>
element is present, exampleApp.jar must be signed.<jnlp>
element, which is the root element of the file, has the attributes in Table 1.<jnlp>
element attributesAttribute | Description |
---|---|
spec | The minimum version of the JNLP specification this file will work with |
codebase | The base URL of your application (the other URLs in the file will be relative to this base) |
href | The URL of the JNLP file itself (JNLP files can be used offline, and this URL tells JWS where to get the online version) |
version | The version of the application and the JNLP file (when you're building JWS applications, think of these as the same thing) |
<information>
element has the attributes shown in Table 2.<information>
elementAttribute | Description |
---|---|
os | The operating systems the JWS application supports |
arch | The architecture (processor) supported |
platform | The supported platform |
locale | The locale supported |
<title>
element contains the title of the application. This is displayed in the JWS control panel. It's also displayed when users start the application with JWS.<vendor>
element contains the name of the software vendor for the application.<resources>
element contains the information about the resources the application requires. Resources here include the JARs that contain classes your application uses or properties your application can set and use. Typical resources can be listed in any one of the elements shown in Table 3 (see Related topics for a full listing).<resource>
elementsElement | Description |
---|---|
<jar> | An href attribute that contains the href to a JAR |
<nativelib> | An href attribute that contains the href to native library JAR |
<j2se> | The version and arguments given to the virtual machine (VM) |
<property> | Specifies properties that can be found by System.getProperty |
Activator
class or the class's package, do so in this window. When you're finished making changes, click Next.WorkbenchAdvisor
class (SimpleApplicationAdvisor
, in this example). IPerspectiveFactory
(that is, SimpleAppPerspectiveFactory
). IPageLayout
passed to its createInitialLayout()
method.WorkbenchWindowAdvisor
(that is, SimpleWindowAdvisor
). preWindowOpen()
, you can set up the initial size and other attributes of the workbench.IApplication
(that is, SimpleApplication
). SimpleApplication.product
).org.eclipse.core.runtime.products
extension point.org.eclipse.equinox.launcher
plug-in is listed. On the Features tab, include any extra features your plug-in or feature requires. If you're in a hurry to see your product with JWS, you can select all of them; it won't hurt anything other than the directory size of your application. However, for a real-world product, you should track down the dependencies to make your download size as lean as possible.codebase
attribute is set to the base URL of the location to which you have published the wrapper feature. It should match the URL you used on the Java Web Start tab in the Deployable features window in Figure 17. The href
attribute is the name of the your JNLP file.<information>
element includes the title, description, and other information about the application being distributed. The <security>
and <application-desc>
elements need to be as shown in Listing 4.<resources>
element to include the correct version of the Equinox launcher plug-in for the <jar>
element. You may have to look in the features directory to find the correct full name of the launcher's JAR. It's likely that the name in Listing 4 will soon be out of date as new versions of the file become available.<extension>
element's href
attribute to include the URL (relative to the URL in the codebase
attribute) of your wrapper feature's JNLP file. Your wrapper feature's JNLP file will include all the other required features and plug-ins.<property>
element to include the ID of the your product. This ID will be the ID from the plug-in's product configuration file (that is, SimpleApp.product
).java.io.FileNotFoundException
, chances are there's an incorrect URL. I received this error when I renamed my initial JNLP file, but forgot to update the value in the href
attribute of the <jnlp>
element.eclipse.product
property in the <resources>
element. Double-check the value of the product ID and make sure it matches the ID in the product configuration file (SimpleApp.product).