cannot embed applet

User 08b9c685a6

14-05-2012 07:52:00

Hello,


I tried embedding the applet through my localhost, and neither:



<script type="text/javascript" SRC="../../../marvin.js"></script>
<script type="text/javascript">
<!--

msketch_begin("../../..", 540, 480); // arguments: codebase, width, height
msketch_end();

//-->
</script>



nor




<applet CODEBASE="../../.." ARCHIVE="appletlaunch.jar"
CODE="JMSketchLaunch" WIDTH=540 HEIGHT=480>
<strong>Your browser does not support the applet tag.</strong>
</applet>




works. the first method simply does not show anything on the page even if my SRC path is correct.

the second method gives an error produces a JMSketchLaunch class not found. even if i change the

CODE section to chemaxon.marvin.applet.JMSketchLaunch, it still says class not found.



the code i have for the html page is:



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<center>
<applet CODEBASE="../../.." ARCHIVE="appletlaunch.jar"
CODE="chemaxon.marvin.applet.JMSketchLaunch" WIDTH=540 HEIGHT=480>
<strong>Your browser does not support the applet tag.</strong>
</applet>

</center>

</body>
</html>





Any suggestions? I'm running the localhost on google chrome.

ChemAxon 7c2d26e5cf

14-05-2012 11:44:25

Probably the codebase URL is wrong.


Please check that the "../../.." relative reference from your HTML document points to the marvin directory.


The above link is correct when the HTML document that refers it is three steps deep in the marvin directory.


E.g.: Marvin is located at:


/var/www/public/devel/marvin

meanwhile the HTML document that refers the applet codebase is located at:


/var/www/public/devel/marvin/examples/applets/sketch/embed.html

User 08b9c685a6

14-05-2012 20:42:16

the marvin folder is just one directory above my html file.


my html file is located at: C:\Users\richard\workspace\project198\WebContent


and marvin folder is located at C:\Users\richard\workspace\project198


And for the codebase, i use ".." . i have also tried "../" , "" , "../..", and every other combination. I also extracted all of the contents of marvin into the C:\Users\richard\workspace\project198 folder, and it still does not work. the error I'm getting is:


ClassNotFoundException


chemaxon.marvin.applet.JMSketchLaunch


 


the details of the error has this:



Java Plug-in 10.4.1.255


Using JRE version 1.7.0_04-b22 Java HotSpot(TM) Client VM


User home directory = C:\Users\richard


----------------------------------------------------


c:   clear console window


f:   finalize objects on finalization queue


g:   garbage collect


h:   display this help message


l:   dump classloader list


m:   print memory usage


o:   trigger logging


q:   hide console


r:   reload policy configuration


s:   dump system and deployment properties


t:   dump thread list


v:   dump thread stack


x:   clear classloader cache


0-5: set trace level to <n>


----------------------------------------------------



ChemAxon 7c2d26e5cf

16-05-2012 08:24:52

How do you try to access the applet example?


If you try it via file protocol (e.g.: C:\Users\richard\workspace\project198\WebContent\example.html) in your browser, it may fail because Marvin is designed to access through web server.


To get further debug information about applet loading, I recommend to set the Java Console debug level to 3.


Just type 3 as the Java console appears (when the applet page is loading).

User a8315b5df0

07-08-2013 09:08:28



Hello,

I tried embedding the applet through my localhost

<applet width="540" height="480"

codebase="http://www.chemaxon.com/marvin/" archive="appletlaunch.jar"

code="chemaxon/marvin/applet/JMSketchLaunch" title="Java">

<param name="legacy_lifecycle" value="true">

<param name="java_arguments" value="-Djnlp.packEnabled=true -Xmx512m">

<center>

<b>YOU CANNOT SEE A JAVA APPLET HERE</b>

</center>

<param name="codebase_lookup" value="false">

</applet>

 

 

<applet mayscript="" width="470" height="445" id="MSketch"

name="MSketch" codebase="marvin/" archive="appletlaunch.jar"

code="chemaxon/marvin/applet/JMSketchLaunch">

<param name="legacy_lifecycle" value="true">

<param name="java_arguments" value="-Djnlp.packEnabled=true">

<center>

<b>YOU CANNOT SEE A JAVA APPLET HERE</b>

</center>

<param name="codebase_lookup" value="false">

 

</applet>

the first method can show applet on the page.



the second method happened the following situation:










Applet is loading...Please wait.




what can i deal with it?


ChemAxon 5433b8e56b

16-08-2013 10:49:39

Hi,


you need to put your Marvin applet into a webserver, and load the site from there. If you are experimenting with this by opening the html file from the local file system, it is more likely will not work.


Can you tell me, exactly how do you open this page? (Exact URL from the title bar of the browser, browser version, java version, operating system, the applet version you have downloaded, are also useful information)


Regards,
Istvan