This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem | |
rem Extract an Oracle JDK for Windows (up to Java 8) from the EXE file | |
rem (c) Olivier Gérardin 2018 [email protected] | |
rem Adapted from https://stackoverflow.com/questions/1619662/how-can-i-get-the-latest-jre-jdk-as-a-zip-file-rather-than-exe-or-msi-installe | |
rem 在这个脚本基础上修改 https://gist.github.com/ogerardin/8f6797186e80e504542680a01594be95 | |
rem 在 AI(gemini-1.5-pro-latest) 和我的努力下完成 | |
rem 新建一个文件夹,里面应该包含 7z.exe、jdk-*-windows-x64.exe、extractjdk.bat(内容为当前脚本),将exe文件拖拽用这个脚本打开 | |
rem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.concurrent.BlockingQueue; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.LinkedBlockingQueue; | |
import java.util.concurrent.ThreadFactory; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; | |
/** | |
* @author wubo | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 控制台输出一个进度条 | |
* 例如 测试 => [##################################################] 12/12 (100%) | |
* | |
* @param prefixStr 进度条前缀 | |
* @param total 总进度 | |
* @param current 当前进度 | |
*/ | |
public static void consoleProgressBar(String prefixStr, int total, int current) { | |
int percent = (int) ((double) current / total * 100); |