JavaWebStartDemoScript

Java Web Start Demo Script

Prerequisities: JDK 1.5.0+, NB IDE 6.0 M7+

  1. Create or open Java Application project that has GUI. You can use sample Anagram Game project which
  can be found under Samples/General in New Project wizard. Do not create the project in directory with space in path. (After creating the project you could build
  and run the project to show it works and how it looks)
  1. Open Project Properties from context menu, select node Application. In the panel fill all the common properties,
  such as Title, Vendor, Description, Homepage, Splash Screen.
  1. Select node Web Start in Project Properties, check Enable Web Start check box. You can provide
  icon for the application, leave the Codebase set to Local Execution. You can check or uncheck Allow Offline
  check box. Hit OK on Project Properties dialog.
  1. Main project configuration combo box in IDE main panel will show Web Start, it means that project is to be
  executed via javaws client.
  1. Do Clean build of the project (Clean and Build Project action in its context menu)
  2. Run the project (via its context menu or if the project is set as main project you can use F6).
  3. Java Web Start Splash Screen will show up (image showing 'Java starting ...') and the application will
  be started (part of the application window will say 'Java application window' which means the application
  is executed via web start). You can use the application. Close the application.
  1. Put breakpoint into some executed code. In the case you are using Anagram Game, open file Anagrams and
  put breakpoint to method 'guessedWordActionPerformed()'. Start debugging the project (via its context menu 
  or if the project is set as main use F5).
  1. Application will be started again via web start and it will stop on the breakpoint. If you are using Anagram Game,
  type some word into the field and hit 'Guess', application wil stop and IDE will hit the breakpoint. You can use 
  debugger commands, such as Step Over, you can use watches etc. Close the application.
  1. Switch to files tab in Explorer, expand project node (Anagram Game node), browse to dist folder and open launch.html page
  in browser (using View action in its context menu). Browser will show simple page for launching the application
  via Web Start. Click the link 'Launch the application' and the application will be started.
  1. Open launch.jnlp file from dist folder. It shows JNLP file descriptor that was created from data entered
  in Project Customizer. The file is generated during build from master.jnlp file that can be found in the 
  root of the project dir. File master.jnlp can be customized by user.
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