B4J Question B4J - How can insert the .jar file created into html?


Licensed User
Hi Erel,

I want to insert the applet created into a html (for execute it from a web url) but I don't know the class name, for example:

<Title>Java Example</Title>

<Applet code="main.class" width="600" height="500" archive="TestDePersonalidad.jar">Necesitas tener Java instalado y un navegador compatible para poder ejecutar este programa.

I put the html file and the jar file into the same directory, but I have an error when I try to Open the Applet.

Incompatible magic value 1008813135 in class file TestDePersonalidad

It is possible? Where is the error? code="main.class" ?

Thanks a lot



Licensed User
Thank you very much for the information, Erel. I was just doing a test.
If anyone finds a way to do it, please, share it with us!
Upvote 0


Licensed User
Theoretically it should be possible to run the app as an applet. This link might be useful: http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm

Java applets are pretty discouraged due to security reasons with the browsers plug-in.

The focus for now is on desktop apps.

Yes, I agree security issue do discourage running java applet from the internet, but they are great for Signed Applications where the client trusts your software.
Given this deploying to the web is still a valid and worthwhile option.

For example we use a java applet to download word documents to a specific folder on the clients machine and when the client is ready a single click on the web side retrieves the new documents and uploads it back to the server. The Commercial product (JUpload Persits software) does not allow you to do anything with this file, but with B4J it would be great if the applet could open it in word,monitored the file, and when its file lock clears it would upload it back to the server. Now that would be a applet that would sell!!!!
Last edited:
Upvote 0


Licensed User
I'm interested too, I've tried but failed so far. Anyone had any joy with this ?
I'll persevere and if I manage to get it to work I'll let you know...

Upvote 0