Solved

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

Posted on 2002-04-01
2
688 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

751 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