The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Path of JVM

Discussion in 'General Discussion' started by nitaish, Oct 2, 2007.

  1. nitaish

    nitaish Well-Known Member
    PartnerNOC

    Joined:
    Jan 6, 2006
    Messages:
    123
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mulund, India, India
    Hello All,

    How do I find the path of the JVM in the server?One of my customers needs it and I cannot find it. Can anybody help me with this?
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If Java was installed via the Tomcat Plugin or EA3, then the JDK is in /usr/local/jdk
     
  3. nitaish

    nitaish Well-Known Member
    PartnerNOC

    Joined:
    Jan 6, 2006
    Messages:
    123
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mulund, India, India
    But, what about the path of the JVM?
     
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The JVM is part of the JDK.

    Put it this way, Java programs are typically started by means the of the java binary, which is located at /usr/local/jdk/bin/java

    Normally what is most important to Java applications is:

    1. The java binary be in the system PATH

    2. The environment variable CLASSPATH be set to the JDK install directory (e.g. CLASSPATH=/usr/local/jdk or some variant thereof).
     
  5. nitaish

    nitaish Well-Known Member
    PartnerNOC

    Joined:
    Jan 6, 2006
    Messages:
    123
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Mulund, India, India
    I am trying to install a software which is a payment gateway client in the server. When I run the installer, it gives me an error saying

    Preparing to install...
    Extracting the installation resources from the installer archive...
    Configuring the installer for this system's environment...
    No Java virtual machine could be found from your PATH
    environment variable. You must install a VM prior to
    running this program.

    I tried to add the path to the JDK in the Environment variable, still the error persists. Since the java and tomcat were installed via WHM, I am reluctant to try re-installing Java from the server.

    Can you help me with resolving the problem? Or can anybody suggest me if I can remove the current java installation and reinstall it directly from the server?
     
  6. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    IF /usr/local/jdk/bin/java exists and is executable, do this:

    Code:
    PATH=/usr/local/jdk/bin/:$PATH
    
    then run the installer for the program. If the above works, add /usr/local/jdk/bin/ to your path export in ~/.bashrc or /etc/bashrc

    If /usr/local/jdk/bin/java does not exist, then you need to find where it is installed on your system and substitute the real path in the above examples.
     
Loading...

Share This Page