This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Installing java on solaris Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Installing java on solaris" Watch "Installing java on solaris" New topic

Installing java on solaris

Kavya Anjali
Ranch Hand

Joined: Mar 23, 2006
Posts: 30
I need to install Java 1.5 on a Sun-Solaris machine. However I havent worked on Solaris before. Nevertheless, I followed a few steps given on the website.

I have downloaded and installed the JAVA version.

$java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
Java HotSpot(TM) Server VM (build 1.5.0_09-b03, mixed mode)

$whence java

$whence javac


$cd /wls_domains/hub05/hub05dA/JAVA_1.5/SUNWj5rt/reloc/jdk/instances/jdk1.5.0/jre/lib/sparc
$ls -l
-rwxrw-r-- 1 hub05dA hub05d 154884 Oct 12 11:32

But when trying to run javac

$javac -verbose
Error: could not find
Error: could not find Java 2 Runtime Environment.

Can you please guide me as to what I need to do so that javac works properly ?

SCJP 5.0
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
What is your PATH? It's possible that the default JDK that is installed with Solaris is before the directory containing the JDK you are using.
It is sorta covered in the JavaRanch Style Guide.
subject: Installing java on solaris