Problems running structure checker from the command line?

User bc9a7e94b9

09-09-2011 20:50:44

Hi,


I am having problems getting structurechecker to run from the command line. I think some similar issues have been raised in the forum, but I couldn't work out what I should do to solve my specific problem.


I am working with Marvin Beans installed via running jchem-5.5.0.1-windows_with_jre.exe ("Run Marvin Installer").


(OS: Windows 7.)


Running this command:


==================================================================


structurecheck <name of file to check> -c <configuration file> -f sdf -o <output file> -n <sdf field to write report to>


==================================================================


yields this output:


==================================================================


java.lang.NoClassDefFoundError: chemaxon/checkers/StructureCheck
Caused by: java.lang.ClassNotFoundException: chemaxon.checkers.StructureCheck
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: chemaxon.checkers.StructureCheck.  Program will exit.
Exception in thread "main" Running structure checker...


=================================================================


 


I also ran the structurechecker.bat file in the hope that this might set up the necessary enviornoment variables, but this just seems to start the GUI?


I'd be grateful if you could point out what I need to do to get the above command to work.


Richard Marchese Robinson

ChemAxon 7c2d26e5cf

13-09-2011 14:52:14

Indeed, it is a bug in the 5.5.0.1 version of Marvin Beans installer.


It forgets refreshing references to Marvin Beans home directory in structurecheck.bat file.


In latest Marvin Beans installer (5.6.0.0), this problem is already fixed.


If you do not want to update to the latest version, you can fix the structurecheck.bat batch file manually.


Replace this part in structurecheck.bat:


SET INSTALLDIR="@MARVINBEANSHOME@"
SET W=%CLASSPATH%
IF EXIST "%INSTALLDIR%". (
    SET SETUPBAT="@MARVINBEANSHOME@\bin\setup.bat"
    SET CLASSPATH="@MARVINBEANSHOME@\lib\MarvinBeans.jar;%CLASSPATH%"
    GOTO AFTER_CLASSPATH
)


With this code:


SET INSTALLDIR="C:\Program Files (x86)\ChemAxon\MarvinBeans"
SET W=%CLASSPATH%
IF EXIST "%INSTALLDIR%". (
    SET SETUPBAT="C:\Program Files (x86)\ChemAxon\MarvinBeans\bin\setup.bat"
    SET CLASSPATH="C:\Program Files (x86)\ChemAxon\MarvinBeans\lib\MarvinBeans.jar;%CLASSPATH%"
    GOTO AFTER_CLASSPATH
)

If Marvin Beans is installed in differ directory than C:\Program Files (x86)\ChemAxon\MarvinBeans, replace the @MARVINBEANSHOME@ pattern with the modified installation directory (instead of the default one that you can see in the above code).