How to embed MarvinSketch in html page using Applet tag

User 873a9ae9d0

09-11-2010 20:05:09

Hi,


 


I try to use the <Applet> tag to embed Marvin Sketch in a html page.


From what I found in the examples both of the following should work:


<applet CODEBASE="../../.." ARCHIVE="appletlaunch.jar"
        CODE="JMSketchLaunch" WIDTH=540 HEIGHT=480></applet>



<applet CODEBASE="../../.." ARCHIVE="jmarvin.jar"
        CODE="JMSketch" WIDTH=540 HEIGHT=480></applet>


(This assumes that the html page is in a subdirectory of the marvin binaries)


In both cases I get an ClassNotFoundException when I open the html page. I assume the class in the CODE attribute is wrong.


Can someone please provide a simple example that use the APPLET tag to embed the Marvin sketcher in a html page. I need to call Marvin API functions i.e. I need to use the APPLET respectively I can not use the marvin.js utility file (this works for me)


Another important question:


What files do I need to put in my local directory to be able to open a html page that embed MarvinSktech. I want to keep that list as small as possible !


Any help or feedback is highly appreciated 


Regards
Hans-Juergen

User 873a9ae9d0

09-11-2010 20:16:04

Hello,


found the problem. Mea culpa !


Never post a question before checking if the problem is already known !


Found the identical problem in the forum. As I did assume the class in the CODE attribute was wrong.


The correct syntax is (since I use Marvin 5.3.8)


<applet CODEBASE="../../.."  ARCHIVE="jmarvin.jar" CODE="chemaxon.marvin.applet.JMSketch" WIDTH=540 HEIGHT=480></applet>


Sorry for the unnecessary post


Hans-Juergen 


 


 

ChemAxon 7c2d26e5cf

10-11-2010 10:24:09

The minimal set of resources for running Marvin applets is the marvin-bin-VERSION.zip package. See linking forum topic: required files to run Marvin applets.