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

Emiliano

Active Member
May 13, 2011
35
0
56
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,226
463
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.
 

Emiliano

Active Member
May 13, 2011
35
0
56
Orlando, Florida, United States
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.

[email protected] [~]# cd
[email protected] [~]# which java
[email protected] [~]# which -java
-bash: type: -j: invalid option
type: usage: type [-afptP] name [name ...]
[email protected] [~]# 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.
[email protected] [~]# 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)
[email protected] [~]# find java
find: java: No such file or directory
[email protected] [~]# find -java
find: invalid predicate `-java'
[email protected] [~]#



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:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
348
somewhere over the rainbow
cPanel Access Level
Root Administrator

Emiliano

Active Member
May 13, 2011
35
0
56
Orlando, Florida, United States