Setting Java in Java
preface
If your computer is equipped with more than one Java environment, but set up Java_ When home is invalid, you can refer to the following method. I won't say much. Let's take a look at the detailed introduction together.
background
My computer is win7 64 bit system. I installed Java 7 when learning java before
Java is configured_ JDK 7 with home as 64 bits
Quick access to environment variables:
Click the start button of win
Open the window with CMD and run Java - version. You can know that the current running java version is java 7
In order to adapt to the jetty server, Java 8 is installed (jetty-9.3.8 requires Java 8)
puzzled
The previous operation did not change Java_ Home, open the window with CMD, run Java - version, and know that the current java version is java8. That is, set up Java_ Home failed, which is not Java 7.0 we set
Open the environment variable and find an additional Java related value C: \ programdata \ Oracle \ Java \ javapath in the path
According to the path, find the file and find Java exe,javaw. Exe and other executable programs. It turned out that these programs were responsible for deleting all the files in this directory. Run Java - version in the CMD window and find that the currently running java version is java 7, which is the previously set Java_ HOME。
C: \ programdata here is the hidden directory of win7 by default. You need to unhide it first.
Computer C > tools C > Folder Options
View C > show hidden files, folders, and drivesc > OK
summary
The above is the whole content of this article. I hope the content of this article can bring some help to your study or work. If you have any questions, you can leave a message. Thank you for your support for programming tips.