tawhe.blogg.se

How to get jdk path in mac
How to get jdk path in mac




how to get jdk path in mac

export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home But if you really know your JDK installed directory, you can add the JDK directory in the export command in.bash: /Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home: is a directory 192:~ zhaosong$ $(/usr/libexec/java_home) Run this command in the terminal like below, you can get the real JDK installation directory. Why this command in macOS? This is because $(/usr/libexec/java_home) can return the real JDK installation home directory.export JAVA_HOME="$(/usr/libexec/java_home)" In vim, press the esc key first then press i key to insert text, click esc then :wq to save and quit. bash_profilecommand in terminal and add below export command in it. You can also run ls -alto list all files under your home directory. bash_profile to make sure the file exists. Run cd ~ in terminal to go to the current user home directory.

how to get jdk path in mac

bash_profile file, this file is saved in the current user’s home directory.

  • First, all environment variable settings are saved in the current user’s.





  • How to get jdk path in mac