Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java applet not working in Azure

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?

like image 315
J punto Marcos Avatar asked Dec 19 '12 14:12

J punto Marcos


1 Answers

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>
like image 64
Tom Avatar answered Oct 01 '22 01:10

Tom