Revision as of 18:28, 6 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)


Java Web Start support in NetBeans 6.1

Current support for Java Web Start (JWS) in NetBeans IDE is only limited to very simple scenarios. For example only application descriptors can be created and no additional resource extensions can be specified in NetBeans GUI which could be limiting. With upcoming JDK 6u10 release with new Java Plugin implementation it would be good if IDE support e.g. also applet deployment via JNLP protocol.

NetBeans 6.5 - New GUI for Java Web Start Customizer

To support applets we would need to extend the current UI of JWS customizer panel.

Following screenshot shows possible extension of the UI:


Comparing to 6.1 version of IDE there are radio buttons for selecting type of descriptor that will be created in final JNLP file.

  • Application descriptor means that the same JNLP file with application-descriptor will be created as with current version
  • Applet descriptor means that JNLP file will contain applet-descriptor element and the JNLP file could be used referenced from HTML page to launch an applet with all advantages the JNLP file can provide
  • Component descriptor means that final JNLP file can be used as resource extension for other JNLP file; useful for library

Extension Resources button opens table like view with additional extension resources, with possibility to define name, href and version of the resource:


Applet params button opens table like view of all applet parameters:


Changes from 6.1 JWS support

In 6.1 and previous releases the JNLP file is fully generated using Ant script and its processing - it means that the script is large complex and is very difficult to extend it workaround some issues. In next release of IDE the main generation part of the script will be replaced by custom Ant task that can do much more and more easily.

Set of properties used to generate JNLP file

Application related properties, those properties are defined in panel Application in Project Properties customizer of J2SE project:

Property Name Type Description
application.desc String Description of the application
application.homepage String Homepage for the application
application.splash String Splash screen for the application; shown during startup of the application
application.title String Name of the application; usually shown during download
application.vendor String Name of the vendor

JNLP related properties, those are defined in panel Web Start in Project Properties customizer of J2SE project:

Property Name Type Description
jnlp.codebase.url String Codebase of the application deployment location
jnlp.codebase.type Enum: local, user, web Type of the codebase; either locally on computer or defined by user or $$codebase for servlet deployment
jnlp.enabled Enum: true, false Wheter the jnlp generation is enabled
jnlp.icon String Icon for the application; usually used on desktop
jnlp.offline-allowed Enum: true, false Whether the application is allowed to run on computer not connected to internet
jnlp.signed Enum: true, false Defines whether to generate self-signed certificate and to sign application jar files of not

Other JNLP related properties that are not exposed in GUI:

Property Name Type Description
jnlp.spec String Specification version of JNLP; used as spec attribute in jnlp element
jnlp.inital-heap-size String Inital heap size
jnlp.max-heap-size String Maximum heap size

These properties needs to be edited by hand in file.

Other properties used when generating JNLP file (these are props used by J2SE project itself):

Property Name Description
javac.classpath Classpath for compilation Version of VM
run.jvmargs Arguments to pass to the application when running
main.class Project main class to be executed

New properties introduced with changes for NetBeans 6.5

Property Name Type Description
jnlp.descriptor Enum: applet, application, component Type of the descriptor
jnlp.ext.resource.{x}.name String Name of extension resource{x}
jnlp.ext.resource.{x}.href String Href of extension resource{x}
jnlp.ext.resource.{x}.version String Version for extension resource{x}
jnlp.applet.class String Applet main class
jnlp.applet.param.{x}.name String Applet param name{x}
jnlp.applet.param.{x}.value String Applet param value{x}
jnlp.htmlpreview String Page to be generated to preview the final JNLP file

Those properties with {x} are meant to be multiple times in properties file with {x} replaced by real index, e.g.:

Other changes:

  • master.jnlp file will be generated by saving project properties with JWS enabled, so far it was first generated during build
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo