Replace the default version jdk under --Mac system with the environment

Replace the default version jdk under --Mac system with the environment

Recent experiments in writing computer networks, idlj need to use this thing.

This thing is Jdk comes with a tool, but to jdk 11, Oracle company to put this component removed, specifically to see the discussion on StackOverflow .

But on my Mac computer only to install the jdk 11, but the job is to be done, how to do it?

After some exploration, the exploration is still pretty smooth.

1 to 8. oracle official website to download the JDK
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Here Insert Picture Description
under Mac systems to download Mac OS X x64 version is that I am a red circle marked of. I have not tried the rest of the platform, I did not dare utter.

2. After the download is a dmg, according to the flow go on OK.
When the installation is complete, the path will
be more of a jdk1.8.0_211.jdk under / Library / Java / JavaVirtualMachines / directory

3. Add the environment variable

vim ~/.bash_profile

Then add in the following paragraph
Here Insert Picture Description
is added let him take effect over
source ~ / .bash_profile

And then view the default java version is a 1.8!
-version the Java
Here Insert Picture Description
4. Then the new project in the idea, you can set up jdk 1.8!
Here Insert Picture Description
May be the first time the new time, not the 1.8 jdk, we have a new enough, find the path to ok!

Then you can use the idlj. How to use idlj not presented here.

Guess you like

Origin blog.csdn.net/ChenglinBen/article/details/91491870