Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    May 2011
    Location
    Orlando, Florida, United States
    Posts
    28

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

    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
    How to find the java root? ant dist error on red5 installation-screen-shot-2011-05-18-2.21.00-pm.png

  2. #2
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    1,346
    cPanel/Enkompass Access Level

    Root Administrator

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

    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.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

  3. #3
    Member
    Join Date
    May 2011
    Location
    Orlando, Florida, United States
    Posts
    28

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

    Quote Originally Posted by cPanelMichael View Post
    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.


    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.
    Last edited by Emiliano; 05-22-2011 at 05:29 PM.

  4. #4
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

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

    From this discussion, it sounds like you are supposed to set the path yourself before it can be found:

    PATH and CLASSPATH (The Java™ Tutorials > Essential Classes > The Platform Environment)

    If you look at the section about setting it in Linux.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #5
    Member
    Join Date
    May 2011
    Location
    Orlando, Florida, United States
    Posts
    28

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

    Quote Originally Posted by cPanelTristan View Post
    From this discussion, it sounds like you are supposed to set the path yourself before it can be found:

    PATH and CLASSPATH (The Java™ Tutorials > Essential Classes > The Platform Environment)

    If you look at the section about setting it in Linux.


    Thanks a lot, I found it definitely under /usr/java/latest

    Have a good day.

Similar Threads & Tags
Similar threads

  1. ANT Error
    By Emiliano in forum New User Questions
    Replies: 2
    Last Post: 05-18-2011, 12:43 PM
  2. Help with Tomcat, Apache ANT, Subversion and Red5
    By FourMat in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-06-2010, 09:45 AM
  3. Java Installation
    By billau in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 03-28-2006, 07:03 AM
  4. Replies: 4
    Last Post: 06-11-2004, 10:19 PM
  5. Java 2 (J2SE) installation
    By adept2003 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-06-2004, 05:09 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube