MarvinSketch + JOGL dependencies

User 370359cdc8

19-10-2010 07:27:51

Why does MarvinSketch always search gluegen-rt-natives-windows-i586.jar and jogl-natives-windows-i586.jar in a user directory in the folder chemaxon\lib? Can this path be specified in jnlp file or it is hardcoded inside MSpace? Is there any method in MarvinSketch API which can be called to extract needed jars/dlls into <user_dir>\chemaxon\lib folder?

ChemAxon 5433b8e56b

19-10-2010 13:28:03

Hi,


i think we will need a little more information about the problem. Are you using MarvinSketch applet or the desktop application? Wich version do you use? And if you can provide some more information about when this search occurs that can also be useful.


Best regards,
Istvan

User 370359cdc8

20-10-2010 08:37:37


Hello!


 


We use MarvinSketch 5.3.8 as an embedded sketcher in a larger web application. We create an instance of chemaxon.marvin.beans.MSketchPane and show it to the end user.


When user runs Tools - Partitioning - logP tool, MarvinSketch throws an exception "java.io.FileNotFoundException: C:\Users\xxx\chemaxon\lib\jogl_1.1.1a\-rt-jogl-natives-windows-i586.jar (The system cannot find the file specified)", although all needed jars are in the classpath.


I guess JOGL native resources should be unpacked prior to usage of logP tool. Does MarvinSketch perform such action itself or it is performed by means og Java WebStart? Is there any method in MarvinSketch API to unpack necessary resources?


User 370359cdc8

21-10-2010 11:05:44

Let me rephrase my question: is it possbible to embed MarvinSketch into another application by means of repacking it into one large jar (using jar utility) and preserve 3D visualisation instruments with JOGL? Because currently after such operation MarvinSketch can't initialize JOGL bindings and throws exception mentioned above.

ChemAxon eb65a25631

21-10-2010 12:34:47

Hi,


So the thing is, you actually trying to use an MSketchPane inside an applet?
It seems, Marvin cannot determine a proper path from where the gluegen-rt-jogl-natives-windows-i586.jar
can be loaded.
Could you create MarvinSpace instance the same place where MsketchPane created with verbosity turned on?
for example:


chemaxon.marvin.space.MSpaceEasy mspace =
 new chemaxon.marvin.space.MSpaceEasy(1, 1, true, true/*verbosity turned on*/, <here pass call the
applet's getCodeBase() method or pass null>);
 mspace.addCanvas(<here call the containing JFrame or applet .getcontentPane() method>);
        chemaxon.marvin.space.MSpaceEventHandler event = mspace.getEventHandler();
        mspace.setSize(600, 600);


Could you send the result printed onto the console?


(Currently I have no information whether we can embed the jogl libraries in the main jar, and retrieve them from there.)


Thanks and regards,
Andras

User 370359cdc8

21-10-2010 14:31:24

Hello, akovacs.




We use a java web start, not the applet.


Console print out :


"Native directory is C:\Users\XXXXX\chemaxon\lib\jogl_1.1.1a


Jogl libraries not found at C:\Users\XXXXX\chemaxon\lib\jogl_1.1.1a


Searching for jogl-natives-windows-i586.jar


Native jar file does not exist: C:\Users\XXXXX\.m2\repository\com\XXX\ext\com\chemaxon\marvin\marvin-beans\5.3.8.2\lib\jogl_1.1.1a\jogl-natives-windows-i586.jar


Native jar file does not exist: C:\Users\XXXXX\.m2\repository\com\XXX\ext\com\chemaxon\marvin\marvin-beans\5.3.8.2\jogl_1.1.1a\jogl-natives-windows-i586.jar


Native jar file does not exist: C:\Users\XXXXX\.m2\repository\com\XXX\ext\com\chemaxon\marvin\marvin-beans\5.3.8.2\..\lib\jogl_1.1.1a\jogl-natives-windows-i586.jar


Searching for gluegen-rt-natives-windows-i586.jar


Native jar file does not exist: C:\Users\XXXXX\.m2\repository\com\XXX\ext\com\chemaxon\marvin\marvin-beans\5.3.8.2\lib\jogl_1.1.1a\gluegen-rt-natives-windows-i586.jar


Native jar file does not exist: C:\Users\vlysov.GRIDDYNAMICS\.m2\repository\com\XXX\ext\com\chemaxon\marvin\marvin-beans\5.3.8.2\jogl_1.1.1a\gluegen-rt-natives-windows-i586.jar


Native jar file does not exist: C:\Users\XXXXX\.m2\repository\com\XXX\ext\com\chemaxon\marvin\marvin-beans\5.3.8.2\..\lib\jogl_1.1.1a\gluegen-rt-natives-windows-i586.jar


Installation failed


java.lang.Exception: Installation failed


at chemaxon.marvin.space.MSpaceInstaller.error(Unknown Source)


at chemaxon.marvin.space.MSpaceInstaller.install(Unknown Source)


at chemaxon.marvin.space.MSpaceEasy.install(Unknown Source)


at chemaxon.marvin.space.MSpaceEasy.<init>(Unknown Source)"

ChemAxon eb65a25631

21-10-2010 16:17:21

Hi,


It seems the reason marvin can't load the needed libraries, because they are not in the same directory as MarvinBeans.jar.
Initially, these files (jogl-natives-windows-i586.jar, gluegen-rt-natives-windows-i586.jar) must be alongside MarvinBeans.jar in either of the
following subdirectories: lib\jogl_1.1.1a\, jogl_1.1.1a\ or ..\lib\jogl_1.1.1a\ .
(If Marvin finds them, it copies them to the directory: <user home>\chemaxon\lib\jogl_1.1.1a for later reuse.)


If you manage to get Maven to place these libraries beside MarvinBeans.jar (into one of the mentioned subdirs.), it should work.


Or, if you can programatically retrive, the place you want to store these native jars, you can create an initializer routine, that retrieves this custom path,
and copies the files to the directory: <user home>\chemaxon\lib\jogl_1.1.1a .
When MarvinSpace starts up, it will find them right away.


Andras