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.

How to find the java root? ant dist error on red5 installation

Discussion in 'General Discussion' started by Emiliano, May 18, 2011.

  1. Emiliano

    Emiliano Active Member

    Joined:
    May 13, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida, United States
    Hello,
    Thank you in advance for your help.

    I have installed
    java-1.6.0-openjdk
    java-1.6.0-openjdk-devel

    Is there anyway, i can find the root path for those installations ?
    I did install them in WHMcpanel at Main >> Software >> Install a RPM.

    I do ssh #java -version and I get:
    java version "1.6.0_17"
    OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-i386)
    OpenJDK Client VM (build 14.0-b16, mixed mode)

    BUT i need it since i am running an installation for red5 and It required the full path since I get an error when i SSH :

    #ant dist
    ~
    ~
    ~
    ---------------------------------------------------------------------
    | | modules || artifacts |
    | conf | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    | java6 | 40 | 0 | 0 | 0 || 59 | 0 |
    ---------------------------------------------------------------------
    [ivy:retrieve] :: retrieving :: red5#server
    [ivy:retrieve] confs: [java6]
    [ivy:retrieve] 0 artifacts copied, 59 already retrieved (0kB/13ms)
    [javac] Compiling 525 source files to /usr/local/red5/bin

    BUILD FAILED
    /usr/local/red5/build.xml:225: The following error occurred while executing this line:
    /usr/local/red5/build.xml:246: Error running /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/javac compiler

    Total time: 2 seconds

    ________________________
    and when I go to
    [/usr/lib/jvm]# ls -al
    total 44
    drwxr-xr-x 3 root root 4096 Apr 1 2008 ./
    drwxr-xr-x 75 root root 36864 May 13 02:39 ../
    lrwxrwxrwx 1 root root 26 Mar 2 22:08 java -> /etc/alternatives/java_sdk/
    lrwxrwxrwx 1 root root 32 Mar 2 22:08 java-1.6.0 -> /etc/alternatives/java_sdk_1.6.0/
    lrwxrwxrwx 1 root root 26 Mar 2 22:08 java-1.6.0-openjdk -> java-1.6.0-openjdk-1.6.0.0/
    drwxr-xr-x 6 root root 4096 May 13 22:08 java-1.6.0-openjdk-1.6.0.0/
    lrwxrwxrwx 1 root root 34 Mar 2 22:08 java-openjdk -> /etc/alternatives/java_sdk_openjdk/
    lrwxrwxrwx 1 root root 21 Mar 2 22:08 jre -> /etc/alternatives/jre/
    lrwxrwxrwx 1 root root 27 Mar 2 22:08 jre-1.6.0 -> /etc/alternatives/jre_1.6.0/
    lrwxrwxrwx 1 root root 30 Mar 2 22:08 jre-1.6.0-openjdk -> java-1.6.0-openjdk-1.6.0.0/jre/
    lrwxrwxrwx 1 root root 29 Mar 2 22:08 jre-openjdk -> /etc/alternatives/jre_openjdk/

    and then if i check further :
    there is a /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/javac
    javac (is green so i guess is a compiler)
    but is not running it.


    Also here is the build.xml
    Screen shot 2011-05-18 at 2.21.00 PM.png
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can use the following command to determine the path of the JAVA executable:

    Code:
    # which java
    The following thread may also be useful to you:

    Install Red5

    Thank you.
     
  3. Emiliano

    Emiliano Active Member

    Joined:
    May 13, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida, United States


    Thank you for your help.
    But i tried in multiple ways to get that root path but still no luck.

    I am gone list bellow all the commands that I tried just to give you a general idea.

    root@ip-72-167-167-187 [~]# cd
    root@ip-72-167-167-187 [~]# which java
    root@ip-72-167-167-187 [~]# which -java
    -bash: type: -j: invalid option
    type: usage: type [-afptP] name [name ...]
    root@ip-72-167-167-187 [~]# java version
    Exception in thread "main" java.lang.NoClassDefFoundError: version
    Caused by: java.lang.ClassNotFoundException: version
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
    Could not find the main class: version. Program will exit.
    root@ip-72-167-167-187 [~]# java -version
    java version "1.6.0_17"
    OpenJDK Runtime Environment (IcedTea6 1.7.5) (rhel-1.16.b17.el5-i386)
    OpenJDK Client VM (build 14.0-b16, mixed mode)
    root@ip-72-167-167-187 [~]# find java
    find: java: No such file or directory
    root@ip-72-167-167-187 [~]# find -java
    find: invalid predicate `-java'
    root@ip-72-167-167-187 [~]#



    Just so that you know I isntalled java with WHMcpanel RPM and I also did
    yum install java-1.6.0-openjdk java-1.6.0-openjdk-devel java-1.6.0-openjdk-javadoc java-1.6.0-openjdk-src
    but that was showing that i have it installed.

    Thank you again for your help.
     
    #3 Emiliano, May 22, 2011
    Last edited: May 22, 2011
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  5. Emiliano

    Emiliano Active Member

    Joined:
    May 13, 2011
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando, Florida, United States
Loading...

Share This Page