Java applet not working in Azure
Asked Answered
D

1

7

I built a simple Java applet which works perfectly locally. When I Upload my website to Azure (as a Cloud Service), it shows a gray box.

I tried Win XP, Win 7, JRE 6, JRE 7 and different browsers. Java console does not show any message.

Any idea of what is happening?

Despoil answered 19/12, 2012 at 14:38 Comment(3)
Have you tried checking the server logs? RDP into the web role box and check the event log. You could also enable Azure Diagnostics to write to blob storage.Speciality
Would you be able to share the failing page URL?Diathesis
Did you manage to resolve the issue in the end?Diathesis
D
5

Did you check if the applet is downloaded from Azure website?

The best way to do that is to use network console in Chrome or Firebug in Firefox and see all the requests and server responses. If there is an issue with any resource, the item becomes red. You will be able to check response error code.

There might be a small issue with file types configuration on Azure IIS and therefore your applet is not served by the server.

In order to change Azure IIS you may need to add configuration change as follows:

<configuration>
    <system.webServer>
        <staticContent>
            <remove fileExtension=".class" />
            <mimeMap fileExtension=".class" mimeType="application/x-java-applet" />
        </staticContent>
    </system.webServer>
</configuration>

EDIT

I checked the URL you provided and I see that you are trying to deploying Java plug-in applets using applet tag attributes and JNLP parameters.

I see JNLP path is set as follows: jnlp_href: basePath + "launch.jnlp" (basePath is "/Content/WorldWindApplet/dist/").

But I am not able to load launch.jnlp from the following path: /Content/WorldWindApplet/dist/launch.jnlp.

Please check if launch.jnlp is located under /Content/WorldWindApplet/dist/. If it is there, then try to add JNPL mapping to IIS.

The code snippet is as follows:

<configuration>
    <system.webServer>
        <staticContent>
            <remove fileExtension=".jnlp" />
            <mimeMap fileExtension=".jnlp" mimeType="application/x-java-jnlp-file" />
        </staticContent>
    </system.webServer>
</configuration>
Diathesis answered 19/12, 2012 at 14:46 Comment(2)
Firebug console shows the same log in Azure and locally. I also tried the configuration change you propose with no success. I keep working on it.Despoil
Very happy that the fix (obviously with .jnlp in both places) worked in the end.Diathesis

© 2022 - 2024 — McMap. All rights reserved.