Solved

Setting up Java

Posted on 2003-10-29
2
269 Views
Last Modified: 2013-12-15
When I type in "java" in the terminal window it uses the built in gjc interpreter.  I've installed the latest Sun SDK and put in in my PATH as well.  However, the java command is still intercepted by gjc.  How do I set up my system so it will run the SUN java executable instead of the gjc when I type "java" or "javac"?
0
Comment
Question by:juraj
2 Comments
 
LVL 1

Expert Comment

by:AgelmarJagad
ID: 9647015
What is probably happening is gjc is earlier in your path than SUN's java.  One way you could get SUN's java to come first is to find the symbolic link "java" that points to gjc and delete it.  
0
 
LVL 5

Accepted Solution

by:
willy134 earned 125 total points
ID: 9660350
type
which java
to see which java is being run.  Like AgelmarJagad said, you need to either have Sun Java listed first in your path
(c-shell--it is very similar for bash but uses export and equals signs)
setenv PATH /path/to/java:${PATH}

or remove the link to gjc java (if it is a link in some /usr/bin or /usr/local/bin dir)
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now