Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
marvin bean..
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message

Joined: 23 Nov 2009
Posts: 4

View user's profile

Back to top
Link to postPosted: Thu Mar 04, 2010 2:51 pmPost subject: marvin bean.. Reply with quote

Hi .

I'm trying to using marvin beans

but I faced with some problem.

I can't find package ( chemaxon.marvin.beans ).

My environment

window xp ,

java version "1.6.0_18"

Java<TM> SE Runtime Environment <build 1.6.0_18-b07>

Java HotSpot<TM>Client VM <build 16.0-b13, mixed mode, sharing>


I got the error message from example marvin beans.

this message is package chemaxon.marvin.beans does not exist

import chemaxon.marvin.beans.MSketchPane:




How can I get the package or install the package?

Thanks for your help

ChemAxon personnel
Joined: 21 May 2004
Posts: 2171

View user's profile

Back to top
Link to postPosted: Fri Mar 05, 2010 12:25 pmPost subject: Reply with quote

I can imagine the following cases when chemaxon.marvin.beans package is not accessible.

1. You does not use the proper distribution. The chemaxon.marvin.beans package is member of Marvin Beans and JChem API. Probably, you have downloaded the Marvin Applets pack that does not include chemaxon.marvin.beans classes. The applets pack is designed to integrate applet into web pages. You can not build custom application with the applet API. So you have to download Marvin Beans pack or JChem pack (JChem includes the full Marvin Beans API).

2. You have not copied all jars from marvinbeans/lib (by Marvin Beans package) or jchem/lib (by JChem pack) into directory where you refer to MarvinBeans.jar or jchem.jar. You don't have to enumerate all jars in your CLASSPATH. Adding MarvinBeans.jar or jchem.jar is enough since it refers to further jars. But these modular jars has to be there. Thus, the Marvin Beans API is not wrapped into a jar, it builds up from those jars that are located in marvinbeans/lib folder.


Joined: 08 Dec 2011
Posts: 3

View user's profile

Back to top
Link to postPosted: Thu Apr 26, 2012 3:36 pmPost subject: package chemaxon.marvin.beans does not exist Reply with quote

Please give a detailed description to solve this problem:

1.) Where to find the valid classpath?

2.) Which .class files are necessary?

3.) Which jar files are necessary?

4.) Which files have to be copied from which source to destiation?

5.) is it possible to simplify the installation using apache ant ?

6.) Where can I find an installation guide?

Operating System: Windows 7; latest marvin and jre Version

Thanks for quick answer

ChemAxon personnel
Joined: 03 Dec 2007
Posts: 688

View user's profile

Back to top
Link to postPosted: Thu Apr 26, 2012 4:41 pmPost subject: Reply with quote


1.: You need to include in the classpath only the MarvinBeans.jar file, it is located in the marvin_installation_dir/lib folder. (by default marvin installation dir is C:\Program Files (x86)\ChemAxon\MarvinBeans if 32 bit installer was used, and the same without the (x86) part if 64 bit installer was used)

2.: neither one of them, MarvinBeans.jar should be enough in the classpath, it holds all the classpath entry it requires, and java can resolve the classes if MarvinBeans.jar is in the classpath.

3.: MarvinBeans.jar

4.: Neither one of them

5.: I think based on the above answers it is not necessary.

6.: Install guide, Lib directory and libraries description.

If you use MarvinBeans in a web container, then the contents of the lib directory should be copied under the library of the web container, and MarvinBeans.jar should be included in the classpath of your server side application.

I hope this helps, if you have further specific issues, please do not hasitate to ask.



Joined: 08 Dec 2011
Posts: 3

View user's profile

Back to top
Link to postPosted: Thu May 03, 2012 3:11 pmPost subject: package chemaxon.marvin does not exist Reply with quote

Thanks for your answer,

unfortunally the problem still remains.
1.) My classpath entry is: C:Programme\ChemAxon\MarvinBeans\lib\MarvinBeans.jar. The exe files run fine.
2.) My installation directory is: C:ChemAxon\MarvinBeans\
3.) Thew Marvin Beans.jar file is under the path C:Programme\ChemAxon\MarvinBeans\lib\MarvinBeans.jar.
4.) The java command to include the msketch classes : import chemaxon.marvin.MSketchPane.*;

How to think about case sensitive spelling?
Which directories are created from MarvinBeans.jar?
Which package and directory names are necessary in the java source and expecteds by the import statement?
How to mmention the Test class MSketchPane?

Thank you

ChemAxon personnel
Joined: 21 May 2004
Posts: 2171

View user's profile

Back to top
Link to postPosted: Mon May 07, 2012 6:01 pmPost subject: Reply with quote

Well, there are a lot of questions here.

As I see, the original problem is that examples/beans/sketch-images/ example in the Marvin Beans package did not work for you because Java missed chemaxon.marvin.beans package.

The compiled SketchImage class is located in the examples/beans/examples.jar file. To be able to run the example, the CLASSPATH has to include examples.jar and the MarvinBeans.jar.

The RUN.BAT launcher file that is located in the same directory than the example (examples/beans/sketch-images) completes this requirement:

SET CLASSPATH=..\examples.jar;..\..\..\lib\MarvinBeans.jar;%CLASSPATH%

java SketchImages %1 %2 %3 %4 %5 %6 %7 %8 %9

Since the bat file includes relative path to the referred jars, the bat file works correctly only from the directory where the bat file is located.
Thus, if you open a command line tool (cmd) in MS-Windows and you navigate to the directory of the SketchImages example ( C:\Programme\ChemAxon\MarvinBeans\examples\beans\sketch-images) where you launch RUN.BAT, the SketchImages example should be started.

Have you tried launching the example by this way?

The SketchImages examples refers to the chemaxon.marvin.beans.MSketchPane class (I guess you had typo in your last comment because you mentioned an "import chemaxon.marvin.MSketchPane.*;" statement but it does not have meeing in Marvin).

The classes of chemaxon.marvin.beans packages are located in the MarvinBeans-beans.jar. But it is not a standalone jar file.

MarvinBeans.jar includes only essential code that all Marvin product uses (like chemaxon.struc or chemaxon.util package). Further resources (like import/export, GUI, calculations, etc.) are organized into other jars in the same directory.
In the main jar, there are hardcoded relative references to all Marvin jars. That's why the main jar (MarvinBeans.jar) is enough in the java CLASSPATH, as my colleague mentioned it earlier.

Normally, Java can resolve these indirect references. By command line usage of java (via RUN.BAT), the classpath resolving should work.
If there is any problem by RUN.BAT, it worth to check wheather RUN.BAT has been evaluated properly.

To do it, insert some debug code into the bat file (after the SET CLASSPATH statement, before the java statement):


run the bat file again and check the output.


If you attempt to run SketchImages from an IDE, I can imagine that the IDE can not resolve these indirect references. In this case, it can cause compilation or runtime error. To fix it, add all jars to the project classpath from the lib directory of the Marvin Beans pack.


File and directory names are case insensitve in Windows. You do not have to care for capitalize letter in CLASSPATH variable.
But java compiler and java runtime tool is case sensitive. So take care for capitalized letters at class and package names in any java statements and in java sources.

If you create a new Java code where you would like to integrate Marvin resources, consult with the Marvin Beans API doc and examples which classes are suitable for you. The API doc provides information the full qualified name of classes. If you use IDE, it can offer to complete import statement automatically when you refer to a class.


Joined: 08 Dec 2011
Posts: 3

View user's profile

Back to top
Link to postPosted: Tue May 08, 2012 4:47 pmPost subject: Reply with quote

Thank you very much,

Yoiu help me a lot. Now I have marched a big step further. I was able to reproduce the example and used my own Java Code with batch files using relative path definitions. Is it possible to use also absolute paths?
Kind regards fritz peter nonnenbruch

ChemAxon personnel
Joined: 21 May 2004
Posts: 2171

View user's profile

Back to top
Link to postPosted: Wed May 09, 2012 10:49 amPost subject: Reply with quote

I admit that our bat file for the example is not too sophisticated since it works only from the same directory where the bat file is located.

To improve it, there are two options:

#1. Replace relative path to absolute manually (if your Marvin Beans is installed into the "C:\Program Files\ChemAxon\MarvinBeans" folder, the new classpath would looks like this)::

SET CLASSPATH="C:\Program Files\ChemAxon\MarvinBeans\examples\beans\examples.jar;C:\Program Files\ChemAxon\MarvinBeans\lib\MarvinBeans.jar;%CLASSPATH%"


#2. Detect the location of the bat file and use this info when you specify the location of the jars.

SET CLASSPATH="%~dp0..\examples.jar;%~dp0..\..\..\lib\MarvinBeans.jar;%CLASSPATH%"

Under the following URL, you can find more info what means exactly the magic %~dp0 expression.

This topic is locked: you cannot edit posts or make replies.
Page 1 of 1

To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum