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

pilbazan

Member
Licensed User
Longtime 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:


B4X:
<Html>
<Head>
<Title>Java Example</Title>
</Head>

<Body>
TEST DE PERSONALIDAD:<br>
<br>
<Applet code="main.class" width="600" height="500" archive="TestDePersonalidad.jar">Necesitas tener Java instalado y un navegador compatible para poder ejecutar este programa.
</Applet>
</Body>
</Html>

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.

ClassFormatError
Incompatible magic value 1008813135 in class file TestDePersonalidad

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

Thanks a lot

Pablo
 

warwound

Expert
Licensed User
Longtime User
Can B4J create a web applet?
I assumed not but will follow your thread and see what replies you get.

Martin,
 
Upvote 0

pilbazan

Member
Licensed User
Longtime 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

DKnowles

Member
Licensed User
Longtime 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

Ratters

Member
Licensed User
Longtime 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...

Thanks
 
Upvote 0
Top