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

x
?
Solved

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

Posted on 2002-04-01
2
Medium Priority
?
693 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 200 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 Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

971 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