Page 1 of 1

HTMLViewer With a Java Applet.

Posted: Tue Nov 23, 2010 9:55 pm
by mattisdada
I have an index.htm, the hello pops up, but the java applet doesn't. Is it possible to have a Java applet in a HTML page? Attached below is the index.htm:

Index.htm:

Code: Select all

<html>
<h> Hello</h>
<applet code="net.minecraft.Launcher" archive="file://localhost/C:\Users\Mattisdada\Desktop\Minecraft Resource For NF Installers\Client\.minecraft\MinecraftLauncher.jar" width="854" height="480">
   <param name="separate_jvm" value="true">
   <param name="java_arguments" value="-Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -Dsun.java2d.d3d=false -Dsun.java2d.opengl=false -Dsun.java2d.pmoffscreen=false -Xms1024M -Xmx1024M">
   <param name="userName" value="Mattisdada">
   <param name="sessionId" value="0">
   <param name="server" value="127.0.0.1">
   <param name="port" value="25565">
</applet>
</html>
Any ideas? Apart from the obvious making a link that makes the index.htm open in an exterior browser.

Re: HTMLViewer With a Java Applet.

Posted: Wed Nov 24, 2010 8:16 am
by BobSchaefer
You do change the location of the jar file that you're trying to load don't you? In the script you posted its hard coded to your user directory, which most likely won't be there on the installed machine. You'll also need to make sure you include it with the installer and then point it to the correct local location when you bring it up. Other than that, I haven't tried doing anything like what you have within IA, so I don't know if it'll actually work or not.

Re: HTMLViewer With a Java Applet.

Posted: Wed Nov 24, 2010 11:36 pm
by mattisdada
Its hardcoded so doesnt matter what, on my test machine i can know it works.

Its obviously still in testing phase. Once completed it will be just "applet.htm" and the installer will do this fully as well.

Its a game called Minecraft. I want to integrate it into the installer, as this is a LARGE installer need the users (who are gamers) have some sort of entertainment while its installing. I know the htm file works regardless of where it is (tested throughly).

So any other ways of getting a Java Applet to work?

Re: HTMLViewer With a Java Applet.

Posted: Fri Nov 26, 2010 2:49 pm
by mills
An applet won't work. Only subsets of html can be viewed with the html viewer (hence a separate control for flash apps).

Re: HTMLViewer With a Java Applet.

Posted: Sat Nov 27, 2010 7:20 am
by mattisdada
Damn thats a pity.... Ill try and work around this then. Now that i know its not possible.

Re: HTMLViewer With a Java Applet.

Posted: Tue Nov 30, 2010 1:31 pm
by mills
You may be able to write a DLL to display a form with an HTML control, using your favorite IDE.