Unable to Install JChem on Debian Linux System

User c91b2283c1

08-02-2010 17:35:31

Hello,


I am unable to install JChem Base on my Debian Linux development machine. I am running Debiana Etch and using an SELinux kernel.


This is how my current Java environment is set up:


jderiksen@dev ~/src $ echo $PATH


/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:~/bin:/usr/local/propel/bin


jderiksen@dev ~/src $ which java
/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/bin/java


jderiksen@dev ~/src $ echo $JAVA_HOME
/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/bin/java


jderiksen@dev ~/src $ echo $INSTALL4J_JAVA_HOME
/usr/lib/jvm/java-1.5.0-sun-1.5.0.14/bin/


This is what happens when I try to install JChem:


jderiksen@dev ~/src $ sh jchem-5_3_0_2-linux.sh
testing JVM in /usr/lib/jvm/java-1.5.0-sun-1.5.0.14 ...
No suitable Java Virtual Machine could be found on your system.
The version of the JVM must be at least 1.5.
Please define INSTALL4J_JAVA_HOME to point to a suitable JVM.
You can also try to delete the JVM cache file /home/jderiksen/.install4j


Thanks for your help,


-John David

ChemAxon 7c2d26e5cf

09-02-2010 12:13:29

I assume that your default Java is a non-Sun distributed package. You can check it by the following way:


java -version


If your have got a non-Sun distributed version, you can get something like that:


java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)
vertset@vertset-office64:~/Documents$ ls /usr/lib/jvm/java-6-sun


My Ubuntu prints this message when I retrieve info from Ubuntu bundled Java package (/usr/lib/jvm/java-6-sun-1.6.0.16).


If you have a Sun distributed Java package, you can get the following package info:


java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Server VM (build 11.0-b16, mixed mode)

ChemAxon products support only Sun distributed Java versions (see more details in System requirements). Installer also expects a Sun distributed Java. If it does not find a proper Java, it invokes an error message.


I can suggest the following options:


A.) Use the JChem installer with bundled Java (jchem-VERSION-linux_with_jre.exe). In this case, installer and installed components will use the bundled Sun Java.


B.) Install a Sun distributed Java to your machine and prefer this Java version in your PATH.

User c91b2283c1

09-02-2010 20:12:40

It turns out that SELinux was preventing Java from running. I fixed this by running the following commands: 


    # semodule -i /usr/share/selinux/refpolicy-targeted/java.pp 


    # restorecon -r -v /usr


java -version now returns the following:


    java version "1.5.0_14"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_14-b03, mixed mode)


I have the Debian sun-java5-jdk and sun-java5-jre packages installed. These are non-free packages and I'm assuming are official Sun Java packages.


Now, when I run the installer, I get the following messages:


Starting Installer ...
java.lang.reflect.InvocationTargetException
        at java.awt.EventQueue.invokeAndWait(EventQueue.java:853)
        at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1257)
        at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
        at com.install4j.runtime.installer.Installer.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
        at com.install4j.runtime.Launcher.main(Unknown Source)
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
        at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
        at java.awt.Button.<init>(Button.java:135)
        at java.awt.Button.<init>(Button.java:122)
        at com.install4j.runtime.installer.frontend.WizardScreenExecutor.initAWT(Unknown Source)
        at com.install4j.runtime.installer.frontend.WizardScreenExecutor.<init>(Unknown Source)
        at com.install4j.runtime.installer.frontend.InstallerWizardScreenExecutor.<init>(Unknown Source)
        at com.install4j.runtime.installer.Installer$1.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Could not display the GUI. This application needs access to an X Server.
If you have access there is probably an X library missing.
*******************************************************************
You can also run this application in console mode without
access to an X server by passing the argument -c
*******************************************************************
An error occurred:
java.lang.RuntimeException
Error log: /tmp/install4jError65133.log


Inspection of the error messages seems to imply that JChem Base will only run on a Linux system with a GUI. Is this the case? Our development server and the web server that we planned to deploy to do not have GUIs for security purposes. Your installation requirements page does not mention that JChem Base for Linux requires a GUI: http://www.chemaxon.com/marvin/help/applications/install.html#requirements


What should we do?

ChemAxon 7c2d26e5cf

10-02-2010 11:42:17

First of all, I have to correct myself. In my previous email, I have mentioned my Ubuntu bundled Java package (/usr/lib/jvm/java-6-sun) as a non-Sun distributed one. It is not true. Since then, I have recognized that it is also a Sun JVM.


Thanks for giving further information about your system environment. The situation is totally clear for me. The JVM that launch the installer throws an exception since GUI is not available on your machine.


In default, installer runs in GUI mode but you can also run it in console/silent mode. Just give the -q parameter in the command line.


sh jchem-5_3_0_2-linux_with_jre.exe -q

By the way, we will also complete the documentation.

ChemAxon 7c2d26e5cf

10-02-2010 11:51:23

By the way, the installer is designed for end-users. Both Linux installer and the cross platform package includes the full JChem package. The installer has got an extra feature:it can place launcher scripts to the desktop to start Marvin application easier. Since you install JChem to a server (not a desktop machine), I guess the jchem_VERSION.zip can be enough for you. Its installation is very easy, just unwrap it somewhere on your machine.

User c91b2283c1

10-02-2010 14:39:38

Hi Tamas,


Thanks for your help. It looks like I was able to install JChem Base.


Thanks again,


-John David