Комментарии:
hi, I had a question pls. I try to switch my java version from 1.7 to 1.8 in terminal. when I test it by java -version or Java - version, i's 1.8 and exactly all good. but, if I quit current terminal and reopen it to check the version, it will come back to 1.7.🤔 probably need to save, but not sure how to do this pls.
ОтветитьHi Raghav, can you please update your video at 5'31'' and just add a note saying that you actually need to type "source .bash_profile" and THEN "echo $JAVA_HOME" in order to display the path ? Thanks Sai Niranjan for your comment.
ОтветитьUse "source ~/.bash_profile" to run the script only then Java home will display output
Ответить@Automation Step by Step hello sir, I have MacBook Air m1, how do I install jdk file on this.
please help me on this.
Thanks for the detailed video, Ragahv. Just wanted to inform many people with updated macOs might be facing issue where echo $JAVA_HOME command will not show the path set. For those just wanted to mention, for me my terminal default was Z shell or zsh. People can find it looking at the top bar of the terminal. For you it is bash, so the echo command display JAVA_HOME. For people Facing this issue, use " source ~/.bash_profile command " after setup and closing the window. Also see below to change terminal
Edit:
If you want to change your terminal, you can use the following commands on any opened terminal window
For bash:
chsh -s /bin/bash
For Zsh:
chsh - s /bin/zsh
Excellent Raghav Sir Salute to you for making thing so simple
ОтветитьHello! Trying to use your appium tutorial so installing Java for that. I have followed how to do the ./bash part but can't get it to work. I have an updated version so I am trying to set this
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home once I go back and run echo $JAVA_HOME I just get a blank
Thank you for the tutorial.
It looks like i have 3 Virtual Machines :(
Matching Java Virtual Machines (3):
10.0.2 (x86_64) "Oracle Corporation" - "Java SE 10.0.2" /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
1.8.291.10 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
1.8.0_291 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
I would like to remove "Java", the middle one. How do i do that?
if i set in export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) in .bash_profile
then java -version is showing
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
and javac -version is showing
javac 10.0.2
How to make both java and javac version same?
Please help.
I have performed , vi ~/.bash_profile , Then press i for insert mode and then typed export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home and the press esc and typed :wq! and enter
Then I opened new terminal and entered echo $JAVA_Home , it is again blank .
But when I am performing vi ~/.bash_profile it is now showing me "export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home" . But why vi ~/.bash_profile is blank which means my env variables arent setting up. pls help
To download java we need to accept cookies on official website..Is that ok to accept..??
ОтветитьHii bhai mare I Mac me java install nhi ho raha
ОтветитьThank you so much, I was on Java 6 and I was not sure why I couldn’t do certain things but when I found out I didn’t know how to fix it but this video helped a ton and everything works now thanks man.
Ответитьhello Raghav, thank you for all your early responses..And also I like your Micky and Minnie stories..I want to install java on my Mac OS Catalina 10.15 version..which java version is best to use for all Devops projects..thanks in advance
Ответитьhi raqhav .... i am unable to add the path of java.(i.e i m not getting the export step in my terminal)
ОтветитьHi Raghav I tried to locate the java in my mac book but it is displaying that not a valid identifier,please suggest what should I do next,and I am new to mac os
ОтветитьIt might be helpful for older version of macOS. I am currently using macOS Catalina and it's not setting up environment vairable permanently. I am fed up now.
Ответитьit confused the beginners at step3
ОтветитьHi Raghav, I have download jdk13.0.2. I created .bash_profile and added export command but when I exit and type echo $JAVA_HOME - Nothing displayed. Where did I go wrong ? Can you help?
ОтветитьHello Raghav,
I did what you have mentioned in video but when I try echo %JAVA_HOME, it gives blank. I have restarted mac, but getting same blank result.
Please need your quick help on this as I was willing to learn appium through your video.
Thank You.
i have added export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
to .bash_profie..still am not able to see echo $JAVA_HOME.Please can you help.
Can you please give the command to switch the java version permanently , I tried
.bash_profile export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
but it doesn't work
Hello Sir, I am not able to save JAVA 1.8 as permanent. After starting new session it is giving JAVA "13" version
ОтветитьHELLO RAGHAV
can you also show how to set maven_home in mac
Hi, Could you please help me, there is no hidden file for the java in my mac, what to do then?
ОтветитьI dont know anything about this. I tried to Install Jira and i have to start with Java. When i type cat .bach_profile it doesnt show em nothing. I dont know what a bash profile is. Can anyone help me pls?
ОтветитьHi Raghav, I am able to change the java version from 12 to 11, but every time I restart my terminal it is going back to 11. Please help
ОтветитьThis is the most clear video on How to install JAVA in Mac I have ever found in internet :)
Ответитьthis video is only for mac book?right
not for windows?
i have created the bash_profile using touch command but i can not figure out how to export java file as i can't see it. please help me with it . i don't see export JAVA_HOME=/library/java..... ? i try writing the export command also using edit command for bash file using my latest jdk, but was not successful please let me know where i am wrong.
Ответитьthanks a lot for solving my problem.
Ответитьwhen i type "cat .bash_profile" it says no such file or directory..... yep i can't let it work
ОтветитьThanks, it worked for me.
Ответить