Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Setting up Java

Posted on 2003-10-29
2
Medium Priority
?
283 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 375 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

876 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