applet does not work, script work, what is wrong here?

User e9d0a9f55d

17-12-2012 06:41:14

applet does not work, script work, what is wrong here?


http://temp.beeware.ch/test.html


error message: ClassNotFoundException


<APPLET
      codeBase="http://temp.beeware.ch/marvin"
      archive="http://temp.beeware.ch/marvin/marvin.js"
      width=350
      height=200
      code="MView">
      <PARAM NAME="mol" VALUE="NC(C)Cc2ccc1OCCc1c2">
      <PARAM NAME="preload" VALUE="MolExport,Parity">
      <PARAM NAME="background" VALUE="#e0e0e0">
      <PARAM NAME="molbg" VALUE="#e0e0e0">
      <PARAM NAME="implicitH" VALUE="hetero">
      <PARAM NAME="navmode" VALUE="rot3d">
      </APPLET>


 


script work:


http://temp.beeware.ch/test1.html


<script type="text/javascript" SRC="http://temp.beeware.ch/marvin/marvin.js"></script>
<script type="text/javascript">
<!--
// marvin_jvm = "builtin"; // "builtin" or "plugin"
mview_begin("http://temp.beeware.ch/marvin", 200, 200);
mview_param("mol", "http://temp.beeware.ch/source/caffeine.mol");
          mview_param("rendering", "wireframe");
          mview_param("atomSymbolsVisible", "true");
          mview_param("viewCarbonVisibility", "off");
          mview_param("explicitH", "true");
          mview_param("implicitH", "all");
mview_end();
//-->
</script>

ChemAxon 7c2d26e5cf

18-12-2012 10:41:12

In your code, the arcive tag contains wrong value, that's why applet loading fails.


<APPLET
      codeBase="http://temp.beeware.ch/marvin"
      archive="http://temp.beeware.ch/marvin/marvin.js"
      width=350
      height=200
      code="MView">
      <PARAM NAME="mol" VALUE="NC(C)Cc2ccc1OCCc1c2">
      <PARAM NAME="preload" VALUE="MolExport,Parity">
      <PARAM NAME="background" VALUE="#e0e0e0">
      <PARAM NAME="molbg" VALUE="#e0e0e0">
      <PARAM NAME="implicitH" VALUE="hetero">
      <PARAM NAME="navmode" VALUE="rot3d">
      </APPLET>

The correct value is:


archive="http://temp.beeware.ch/marvin"

The archive tag has to refer the directory where marvin package is located.

User e9d0a9f55d

18-12-2012 19:44:29

 


thank you very much for replying, but it does not work that way.

it's also in contrast to:


The traditional applet tag for MarvinView and the built-in JVM can be used the
following way:




 <applet CODEBASE="../../.." ARCHIVE="appletlaunch.jar" CODE="JMViewLaunch" WIDTH=200 HEIGHT=200>
<param NAME="mol" VALUE="../../../mols-2d/caffeine.mol">
<strong>Your browser does not support the applet tag.</strong>
</applet>
 

ChemAxon 5433b8e56b

28-12-2012 14:42:39

Hi,


The code need some more modification.


The ARCHIVE property has to point one of the main jars, wich are jmarvin.jar, and appletlaunch.jar. When pointing to appletlaunch.jar, you will have a splashscreen while the applet is loading, and in this case with the CODE property you can choose chemaxon.marvin.applet.JMViewLaunch for the viewer, and chemaxon.marvin.applet.JMSketchLaunch for the sketcher.


If you set the jmarvin.jar as the value of the ARCHIVE property, you can set the CODE property to chemaxon.marvin.applet.JMSketch for the sketcher, and chemaxon.marvin.applet.JMView for the viewer.


 


I hope this helps, here is the modified exampler which should work:


<APPLET
      codeBase="http://temp.beeware.ch/marvin"
      archive="appletlauch.jar"
      width=350
      height=200
      code="chemaxon.marvin.applet.JMViewLaunch">
      <PARAM NAME="mol" VALUE="NC(C)Cc2ccc1OCCc1c2">
      <PARAM NAME="preload" VALUE="MolExport,Parity">
      <PARAM NAME="background" VALUE="#e0e0e0">
      <PARAM NAME="molbg" VALUE="#e0e0e0">
      <PARAM NAME="implicitH" VALUE="hetero">
      <PARAM NAME="navmode" VALUE="rot3d">
      </APPLET>

Regards,
Istvan

User e9d0a9f55d

01-01-2013 18:35:14

Perfect, Thank you!