How to see java installed directory ? Please help me


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to see java installed directory ? Please help me
# 1  
Old 10-27-2011
How to see java installed directory ? Please help me

Hi All,

I am using SunOS 5.8 and KSH shell. My problem is , I can't find my java installed directory. Java is running from /usr/bin folder but I think there java is the link to actual java directory. Also nothin is set to $JAVA_HOME env variable. How to see the actual program location pointed by 'usr/bin/java' link.

Please help me as I am struggling to find it out for past 3 hours.
# 2  
Old 10-27-2011
Code:
~/$  ls -l /usr/bin/java
lrwxrwxrwx   1 root     other         16 Jul 27  2007 /usr/bin/java -> ../java/bin/java

so /usr/java/bin/java is my JRE unless there is a link further up that chain...
Code:
ls -l /usr/java
lrwxrwxrwx   1 root     other         15 Jul  8  2009 /usr/java -> jdk/jdk1.5.0_19

so is /usr/jdk/jdk1.5.0_19 , well it would seem not...
Code:
ls -l /usr/jdk/jdk1.5.0_19
lrwxrwxrwx   1 root     other         18 Jul  8  2009 /usr/jdk/jdk1.5.0_19 -> instances/jdk1.5.0

and finally
Code:
ls -l /usr/jdk/instances/jdk1.5.0
total 34630
-rw-r--r--   1 root     bin         2487 May  4  2009 COPYRIGHT
-rw-r--r--   1 root     bin        18272 May  4  2009 LICENSE
-rw-r--r--   1 root     bin        20415 May  4  2009 README.html
-rw-r--r--   1 root     bin        67235 May  4  2009 THIRDPARTYLICENSEREADME.txt
drwxr-xr-x   3 root     bin         1024 Jul  8  2009 bin
drwxr-xr-x   9 root     bin          512 Jul  8  2009 demo
drwxr-xr-x   3 root     bin          512 Jul  8  2009 include
drwxr-xr-x   6 root     bin          512 Jul  8  2009 jre
drwxr-xr-x   2 root     bin          512 Jul  8  2009 lib
drwxr-xr-x   3 root     bin          512 Jul 27  2007 man
-r--r--r--   1 root     other       5230 Jul  8  2009 register.html
-r--r--r--   1 root     other       5662 Jul  8  2009 register_ja.html
-r--r--r--   1 root     other       4840 Jul  8  2009 register_zh_CN.html
drwxr-xr-x   4 root     bin          512 Jul 27  2007 sample
-rw-r--r--   1 root     bin      17570501 May  4  2009 src.zip

So in my case //usr/jdk/instances/jdk1.5.0/bin/java is my actual binary
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash find version of an installed application but if none is found set variable to App Not Installed

Hello Forum, I'm issuing a one line bash command to look for the version of an installed application and saving the result to a variable like so: APP=application --version But if the application is not installed I want to return to my variable that the Application is not installed. So I'm... (2 Replies)
Discussion started by: greavette
2 Replies

2. Shell Programming and Scripting

Cannot run this .java file from the home directory??

I wrote a simple test.java program in vi. I know it compiles correctly because I went into the directory where test.java was and compiled it and it created a java.class. I then ran test.java by staying in the same directory where it was and it worked great. However, when i backed out of the... (3 Replies)
Discussion started by: syregnar86
3 Replies

3. Solaris

Sun Java Directory Server icon

This probably is immensely trivial, but as the bank robber in the movie Dirty Harry says, "I gots to know." In Sun Java Directory Server's (v 5.2) list of users and groups, there are several scores of usernames that have an icon that looks like a blue circle. Below that are scores of usernames... (0 Replies)
Discussion started by: chilinski
0 Replies

4. Shell Programming and Scripting

How to run the Shell Script from external directory using java?

Hi, I have created a Shell Script and invoke through java using Process Builder It's working fine, if (Shell script file ) in the same directory as java file. By Problem: How to run the Shell Script file( resides in external directory) using java. What configuration i have... (1 Reply)
Discussion started by: nanthagopal
1 Replies

5. Shell Programming and Scripting

installed java version ?

Hi, I want to know what version of the java is installed? Please let me know the command or process to identify the installed java version in sun solaris box. Thanks in advance for all your support. (3 Replies)
Discussion started by: sridhardwh
3 Replies

6. Programming

Delete directory in java

Hello, Please, how can i delete a directory which contain directories and files (in Java)? Thank you so much for help (2 Replies)
Discussion started by: chercheur857
2 Replies

7. Red Hat

Trouble with installed / not installed rpm unixODBC/libodbc.so.1

Hey there, i run 1: on my server (RHEL 6) and getting response that the libodbc is not installed. If i use yum for installation, it tells me, there is no package like this ( 2: ). Since in the description of Definiens is mentioned that the Run-time dependency is unixODBC (libodbc.so.1), I assume... (2 Replies)
Discussion started by: rkirsten
2 Replies

8. UNIX for Dummies Questions & Answers

How can i understand if a Java Virtual Machine is installed on Unix??

Hello, i would like to figute out, if there is any JVM installed on my unix account. How can i figure that out?? Thanks (1 Reply)
Discussion started by: g_p
1 Replies

9. Solaris

Sun Java System Directory Server

Hi, Does anyone know if the Sun Java System Directory Server (now Oracle Directory Server) is freely available for download? Thanks (1 Reply)
Discussion started by: Mack1982
1 Replies

10. Solaris

Setting link to newly installed Java version

Hi, I have Solaris 8 wih Java 1.2.2 as default. I just upgraded it to Java 2 version 1.4. But when I do "java -version: I get following: "Java version "1.2.2" Solaris VM (build Solaris_JDK_1.2.2_05a, native threads, sunjwit) How would I make solaris to look at my new java? If I have to... (4 Replies)
Discussion started by: harjitsingh
4 Replies
Login or Register to Ask a Question