Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
After I enter that line I check with "which java" and it returns the correct path. However when I try to include this in my .bash_profile the path is not recognised. I am using the following lines to put in my profile -
You may also want to put your $PATH info in the .bashrc file as the variables in the .bashrc file are exported from shell to shell being when you spawn a new shell these variables get kept in the new shell.
You may also want to make sure you include a "$" in any variables you use..ie your JAVA_HOME in you path did not have a $ to indicate it was a variable.
I tried putting the path in my .bashrc however I didn't have much luck there. I also noticed that when I log in as regular user I can use the export command and get Java to run my programs. I guess I'm not too put out if I have to do that but I will try two more things with bash files then I'm going to throw in the towel for now. Again thanks for the tips!
**One quick question for the moderator**
Why does my envelope have a bullet point on it? Have I put this question in the wrong forum?
you are sure that you are using your JAVA_HOME variable correctly.
You had :
Notice your PATH statement, the JAVA_HOME needs to be $JAVA_HOME. If this is not the case, type this command:
env | grep j2sdk (this will only display the lines with "j2sdk" in it if it is there.)
This will dump out all your environment variables, you should see your path and your java_home variables, if you don't then you are not setting them correctly in your profile or .bashrc.
review what was posted earlier and make sure all your spellings are correct, I have been bitten by that before.
I rechecked the spelling and the misspelling was in my initial post. In my .bash_profile I had it correct with the $ in front of Java_Home. However I noticed that I had commented out the PATH line in the following
#PATH=/usr/local/blackdown/j2sdk1.3.1 -- this line was commented out
Now when I save my changes another problem arises. Basic shell commands are no longer recognised. Below is the .bash_profile in its entirety. I'm guessing the first Path statement is conflicting with the path statement for Java?
#Take the below line out it is messing you up, it is setting your path to the /usr/local/blackdown/j2sdk1.3.1 #PATH=/usr/local/blackdown/j2sdk1.3.1