Verify and enter the following command echo $JAVA_HOME Use the source command to refresh the configuration file to make the modified configuration file effective immediately. Press first ESC, And then press the keyboard i 1.3.4 Append environment variablesĪdd environment variables to the last few lines of the file as follows: export JAVA_HOME =/Library/java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/HomeĮxport CLASSPATH = $JAVA_HOME/lib/tools.jar: $JAVA_HOME/lib/dt.jar: $JAVA_HOME/jre/lib/rt.jar.įirst press ESC on the keyboard, then enter :wq Use the vi command to open the /etc/profile file vi /etc/profile Enter the command as follows: sudo chmod -777 /etc/profile You need to add write permission to the /etc/profile file. Open Finder -> Preferences (top left corner of the screen)ġ.3 The details of the installation steps are as follows:īy default, /etc/profile has no write permission. If you want to see this directory in the graphical user interface, you need to do two steps 1.2 Modify Finder The real installation path is as follows: /Library/java/JavaVirtualMachines/jdk1.8.0_241.jdk/Contents/Home
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |