2

I am attempting to display a working applet in Firefox (and will also want to display it in IE). I am using the following in my HTML:

<script src="http://www.java.com/js/deployJava.js"></script>
<script> 
    var attributes = {
        code:'home.applets.demo.demo1.class',  width:300, height:300} ; 
    var parameters = {jnlp_href: 'test.jnlp'} ; 
    deployJava.runApplet(attributes, parameters, '1.6');       
</script>

My test.jnlp file contains the following:

<jnlp spec="1.0+" codebase="" href="">
<information>
    <title>Bouncing Balls Demo</title>
    <vendor>Me</vendor>
</information>
<resources>
    <!-- Application Resources -->
    <j2se version="1.6+"
        href="http://java.sun.com/products/autodl/j2se" />
    <jar href="demo1.jar" main="true" />

</resources>
<applet-desc 
     name="Bouncing Balls Demo Applet"
     main-class="home.applets.demo.demo1"
     width="300"
     height="300">
 </applet-desc>
 <update check="background"/>
</jnlp>  

It looks to me as if I have done everything I need to do. I placed the JNLP and JAR file in the same directory as the HTML file. It looks like my JNLP and HTML are correct, yet when I display the page the applet does not appear. Even worse, there are no failure messages or anything to indicate that anything is happening at all!

Am I missing something here? Someone please advise.

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Factor Three
  • 2,094
  • 5
  • 35
  • 51
  • I am certainly no expert in this, but I didn't think that you were supposed to mix Java Web Start with applets. Please correct me if this is wrong. – Hovercraft Full Of Eels Mar 26 '12 at 19:06
  • 1
    Actually, the latest documentation addvises the use of JNLP files for Applet use. – Factor Three Mar 26 '12 at 21:03
  • Do you have a reference for this? Sorry to hijack your thread, but if you do -- thanks! – Hovercraft Full Of Eels Mar 27 '12 at 00:25
  • 1
    @Hover See the [JNLP](http://stackoverflow.com/tags/jnlp/info) & [Applet](http://stackoverflow.com/tags/applet/info) info. pages and look for mentions of 'Next Generation'. To the OP. That JNLP is invalid. Check it using [JaNeLA](http://pscode.org/janela/). – Andrew Thompson Mar 27 '12 at 06:18
  • Using JaNeLA did not really help. It is a good analyzer that tells where the errors are in the JNLP file, but the error messages are far too cryptic to be useful and they give no clues as to hw to actually fix anything. – Factor Three Mar 27 '12 at 12:31
  • Which errors are not covered in the [JaNeLA Help](http://pscode.org/janela/help.html)? Which explanations in the JaNeLA Help are too cryptic? I am in a good position to improve them, with your input. @Hovercraft You're welcome. :) – Andrew Thompson Mar 27 '12 at 12:37
  • I have seen where the JNLP file is invalid -- a really annoying fact since I copied it from an Oracle example JNLP file for an Applet! Using JaNeLA did not really help. It is a good analyzer that tells where the errors are in the JNLP file, but the error messages are far too cryptic to be useful and they give no clues as to how to actually fix anything. I am going to abandon using JNLP because it is not worth the frustration I am going through. I will try using applet or object tags and post a question if I continue to have problems... – Factor Three Mar 27 '12 at 12:39

1 Answers1

0

First thing I would suggest to do it go into your control panel>java>advance and enable the java console.

Second, while in the java console press 5 so you can see all error levels

Third, if you are testing this on a webserver try testing it locally.

Fourth, if it is only not working on the webserver make sure that you have enabled jnlp Mime types in the IIS server.

4drenaline
  • 55
  • 1
  • 8