Marvin Sketch

User 5b7b568917

18-05-2006 18:38:06

I coped the marvin.js file and tried to open it using the HTML code, but the applet is not loading. could you please help me to put marvin applet in my application

ChemAxon 7c2d26e5cf

18-05-2006 19:39:18

Probably the codebase is wrong or the jar files are missing.


The codebase should point to the marvin directory where Marvin sources: jmarvin.jar, sjars/**/*.jar, etc. are located.


Code:
<script LANGUAGE="JavaScript1.1" SRC="../marvin/marvin.js"></script>


<script LANGUAGE="JavaScript1.1">


<!--


msketch_begin("../marvin", 460, 380); // arguments: CODEBASE, WIDTH, HEIGHT


msketch_end();


//-->


</script>



In the above example the relative path of the marvin directory is "../marvin".

User 5b7b568917

19-05-2006 15:34:47

thanks for the reply. Could you please tell me where can I download jmarvin.jar file from?


I have marvinbeans.jar on my tomcat lib server.

User 5b7b568917

19-05-2006 17:32:08

Hello Tamas,





When I am trying to open the marvin applet from my application, there appears a box with a red cross at the corner and it displays as "exception: java.lang.NullPointerException". The applet is not loading. I have the jamrvin and the jmsketch .class.





Could you please explain a step-by-step procedure of loading the applet in my application.





Thanks,


Usha

ChemAxon 7c2d26e5cf

22-05-2006 20:19:35

How did you try to launch the applet?


Did you used the "javax.swing.text.html" package to display a html in a Swing component? This is not the right way.


Your application should launch a (Java capable) browser (like Firefox, Mozilla or IE) to run an applet. I suggest you the following document in this subject: Control browsers from your Java application