Forum Stats

  • 3,855,322 Users
  • 2,264,499 Discussions
  • 7,905,968 Comments

Discussions

problem viewing local html page containing applet!

887433
887433 Member Posts: 2
edited Sep 19, 2011 1:32AM in Java Applet Development
I have the following requisite three files in a local directory "C:\Users\thomas\Documents\vinu\hyperdyn\src\":

*.html
*.jar
*.jnlp

When I double click the html file to launch it, the applet fails to load and the Java console prints the following error message:

Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM
User home directory = C:\Users\thomas
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


MissingFieldException[ The following required field is missing from the launch file: <jnlp><applet-desc>width]
at com.sun.javaws.jnl.XMLUtils.getRequiredIntAttribute(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.buildAppletDesc(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
at sun.plugin2.main.client.PluginMain.access$300(Unknown Source)
at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error while initializing manager: MissingFieldException[ The following required field is missing from the launch file: <jnlp><applet-desc>width], bail out

The strange thing is that I do have the height and width parameters specified in the jnlp file:

<applet-desc
name="..."
main-class="..."
width="640"
height="355">
</applet-desc>

The stranger thing is that if I modify the path to the local directory, for example, add a dash to make it "C:\Users\thomas\Documents\vinu\hyperdyn\src-\", then the applet launches without any error! I am working on Windows 7 Home Premium, Service Pack 1. Any insights anyone may have will be greatly appreciated.
Tagged:

Answers

  • 793415
    793415 Member Posts: 7,279 Bronze Badge
    <ol>
    <li>Validate the JNLP using JaNeLA.
    <li>If that fails to identify the problem, post the entire JNLP to the forum (and none of that silly "..." nonsense - include actual values.)
    </ol>

    Where can we see the applet fail? (Set up a test page on a public server.)
  • 887433
    887433 Member Posts: 2
    Andrew, thanks for your attention. I eventually solved the problem by deleting the cache:

    Java Control Panel->General->Temporary Internet Files->Settings...->Delete Files...
This discussion has been closed.