This article is a mirror article of machine translation, please click here to jump to the original article.

View: 21359|Reply: 2

[JavaSE] [Practice] Make a green no-install version of Java JDK Windows

[Copy link]
Posted on 2021-9-25 18:06:19 | | | |
Since Java was acquired by Oracle, the new version under Windows only has an installation version, no zip free installation. Linux environments are available in no-install versions.

The Windows installation version has the following disadvantages:

  • Writes a registry
  • java.exe, javaw.exe, etc. will be extracted to C:\Windows\System32 or C:\Windows\SysWOW64
  • The regular update program will be set to boot auto-boot, and a pop-up prompt for the new version will be found
  • An oracle javapath will be written in the PATH, and jre\bin will be added


Therefore, if you make an installation-free version, you don't need to go through cumbersome installation steps, just copy and unzip and set the environment variables.

JDK download address:The hyperlink login is visible.
I need to register an Oracle account to download, and I have uploaded the downloaded to another website:The hyperlink login is visible.

Take the JDK-8U301 version as an example, download the jdk-8u301-windows-x64.exe file, extract it using 7-zip (Winrar will give an error when unpacking! )


Extract it to the jdk-8u301-windows-x64 directory, as shown below:



Then enter.rsrc\1033\JAVA_CAB10directory below, execute the following command:




Once the execution is complete,tools.zip file is generated, use the decompression tool to decompress to tools, and after the decompression is completed, as shown in the figure below:



Go to the tools file and run the following command to change the .pack file to a .jar file, as shown in the figure below:





Enter again.rsrc\1033\JAVA_CAB9folder, and execute the following command to get the source code package:



The released src.zip does not need to be unzipped, just copy it directly to the tools directory, and at this point, the Java JDK Windows green no-install version is complete!


Green Instant Download AddressThe hyperlink login is visible.

Copy the tools folder rename jdk_1.8.0_301 to the D:\Java directory and add the following command to the environment variables:

cmd to set the permanent environment variable command
https://www.itsvse.com/thread-9230-1-1.html

Note: You must run the cmd execution command as an administrator,And dividetwiceExecute in a new cmd windowOtherwise, the second command will not be able to successfully obtain the value of JAVA_HOME.

Start running the cmd command and run the following command to see the Java version:

C:\Users\itsvse_pc>java -version
java version "1.8.0_301"
Java(TM) SE Runtime Environment (build 1.8.0_301-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.301-b09, mixed mode)




(End)




Previous:nslookup command briefly introduced
Next:The difference between Expression<Func<T, bool>> and Func<T, bool> in EF
Posted on 2021-9-26 17:32:48 |
Learn to learn...
 Landlord| Posted on 2024-4-7 16:31:55 |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com