Solved

Set up a path for Java Compiler in Red Hat Linux 7.2

Posted on 2002-04-01
2
682 Views
Last Modified: 2013-12-06
Hi all,
Recently, I have just install J2sdk1.4.0 into Red Hat Linux 7.2. I am tired of typing the long path name and I have just included the path into .bash_profile file. I dont know is this the correct way but It seems not as the path is not working. So can anyone tell me what's my mistake.

Just in case I have inserted a path into the correct file (.bash_profile), The contents of the file is as below:

#.bash_profile

PATH=$PATH: $HOME/BIN; /usr/java/j2sdk1.4.0/bin

Can anyone explain to me my mistake. and in a layman term because I am new to linux.

Thanks.

0
Comment
Question by:antioch_75
2 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 6910548
Your PATH setting in .bash_profile looks okay, but that file is only read on initial login. So for the PATH to be modified you have to log out and log back in.

Making a similar change in .bashrc will take affect each time a new shell is started and is probably a better place.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 6914290
you have wrong syntax in your (listed) .bash_profile:
replace the ; (semicolon) by : (colon) in the PATH assignment (then follow jlevie's suggestions)
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 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

21 Experts available now in Live!

Get 1:1 Help Now