Can I install jdk without public jre?

when installing jdk, you can choose not to install public jre, as shown in the following figure. Because there is already jre in jdk. I haven"t installed jre, yet. I haven"t found anything wrong yet. I can develop it normally. I would like to ask you if there are any problems that I have not found in the installation, please let me know.

clipboard.png

in addition, my environment variable is configured to;% JAVA_HOME%\ bin;%JAVA_HOME%\ jre\ bin
when I type the command java under cmd, if I follow the precedence priority, then I should execute% JAVA_HOME%\ bin\ java.exe instead of% JAVA_HOME%\ jre\ bin\ java.exe.
I don"t understand why we need two java.exe,. I have tried two java.exe-version execution results are the same, but the file hash value is different, indicating that the file is different. Is there a big god clear?

Mar.09,2021

your description:
when I type the command java under cmd, if I follow the precedence priority, then I should execute % JAVA_HOME%\ bin\ java.exe instead of % JAVA_HOME%\ jre\ bin\ java.exe .
is wrong, because the java.exe you really use is java.exe;
in System32 in the Windows directory (64-bit system may not be the name of this directory). The reason why you need to join the path, of jre's bin in the jdk directory is that some components are needed to run java software directly. For example, if you run a game or project published by java directly, you may need tools in jre


.

I am also learning Java,. I can learn from a passage in "Crazy Java" written by Li Gang

Public JRE is a stand-alone JRE system that is installed separately under other paths on the system. The public JRE registers the JAVA runtime environment with the IE browser and the system. In this way, public JRE can be used by any application in the system. Since there are fewer and fewer opportunities to execute Applet on a web page, and you can use JRE in the JDK directory to run JAVA programs, there is not much need to install public JRE

Java P9


can not be installed. JDK comes with jre,. You can go to the bin directory to have a look at


. The OpenJDK, used is not even installed (it is too annoying to hang in the background after installation). Just unpack it and then match it with JAVA_HOME. Of course, it may have something to do with using less. )


jdk is the development environment, jre is the running environment, if you want to carry out java development in this system, install jdk on it, you can not install a directory in jre,jdk is jre, if you only want to run java edited code in the system, just install jre.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bdfc-3467b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bdfc-3467b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?