-bash: /.bash_profile: No such file or directory [on hold]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


-bash: /.bash_profile: No such file or directory [on hold]



After installing Java SE Development Kit 10



When I try to check which version is activated on bash and when I do the same way as the way is teached on this MOOC and on this specific course:



For starting to be sure I’m on the right dir I do:


cd ~
/.bash_profile



I receive this error:


-bash: /.bash_profile: No such file or directory



And then after what can I do if the file is empty what should i put in it?



If you get the same error just check that edited post.



This question appears to be off-topic. The users who voted to close gave this specific reason:





1. The links provided lead to websites which are not in English language. 2. Unfortunately questions asking for: books, tutorials, or other off-site resource are off-topic and should be closed. Stack Overflow is a Questions & Answers website for specific programming questions.
– sɐunıɔןɐqɐp
20 hours ago





Leading / means it is in the root directory. Try: . ./.bash_profile. The first dot means "source (read) the file" the second means "current directory", the third is part of the filename. BTW, default for cd is the home directory, the ~ is superfluous.
– cdarke
20 hours ago




/


. ./.bash_profile


cd


~





Go back and look carefully. I'm sure they didn't say for you to enter /.bash_profile exactly.
– lurker
20 hours ago




/.bash_profile





check whether the .bash_profile exists in the home directory or not using vi command.
– Dinesh
20 hours ago





not Java, just pure bash: - the course states, as much as I could find, to open ~/.bash_profile not /.bash_profile
– Carlos Heuberger
20 hours ago


~/.bash_profile


/.bash_profile




1 Answer
1



The command needed was:


vi ~/.bash_profile



And then I just need to write:



JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/
PATH=$JAVA_HOME/bin:$PATH



And then saving it with:


:wq





refer cyberciti.biz/faq/linux-unix-set-java_home-path-variable to set java path
– Vivek Pakmode
19 hours ago

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results