{"id":3315,"date":"2026-11-04T16:03:36","date_gmt":"2026-11-04T08:03:36","guid":{"rendered":"https:\/\/linuxjk.cn\/?p=3315"},"modified":"2026-11-04T16:03:36","modified_gmt":"2026-11-04T08:03:36","slug":"dbeaver-%e6%95%85%e9%9a%9c%e6%8e%92%e6%9f%a5","status":"publish","type":"post","link":"https:\/\/linuxjk.cn\/?p=3315","title":{"rendered":"DBeaver \u6545\u969c\u6392\u67e5"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#Java_%E4%B8%8B%E8%BD%BD%E5%9C%B0%E5%9D%80\" >Java \u4e0b\u8f7d\u5730\u5740<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#%E6%95%85%E9%9A%9C%E6%B8%85%E5%8D%95\" >\u6545\u969c\u6e05\u5355<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#001_%E5%A0%A1%E5%9E%92%E6%9C%BA_DBeaver_%E5%B4%A9%E6%BA%83%E5%8F%8A%E8%BD%AC%E5%82%A8%E6%96%87%E4%BB%B6%E5%A2%9E%E9%95%BF\" >001 \u5821\u5792\u673a DBeaver \u5d29\u6e83\u53ca\u8f6c\u50a8\u6587\u4ef6\u589e\u957f<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#1_%E7%8E%AF%E5%A2%83%E5%92%8C%E5%8E%9F%E5%9B%A0\" >1. \u73af\u5883\u548c\u539f\u56e0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#2_%E6%8E%92%E6%9F%A5%E5%91%BD%E4%BB%A4\" >2. \u6392\u67e5\u547d\u4ee4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#3_%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%88%87%E6%8D%A2_Java\" >3. \u4e0b\u8f7d\u5e76\u5207\u6362 Java<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#4_%E5%90%AF%E5%8A%A8%E5%B9%B6%E9%AA%8C%E8%AF%81\" >4. \u542f\u52a8\u5e76\u9a8c\u8bc1<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#5_%E6%B8%85%E7%90%86%E5%8E%86%E5%8F%B2%E5%B4%A9%E6%BA%83%E6%96%87%E4%BB%B6\" >5. \u6e05\u7406\u5386\u53f2\u5d29\u6e83\u6587\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#6_%E8%B5%84%E6%96%99%E6%95%B4%E7%90%86%E5%92%8C%E5%9B%9E%E9%80%80\" >6. \u8d44\u6599\u6574\u7406\u548c\u56de\u9000<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/linuxjk.cn\/?p=3315\/#%E5%8F%AF%E9%80%89%EF%BC%9A%E9%9C%80%E8%A6%81%E6%97%B6%E5%9B%9E%E9%80%80\" >\u53ef\u9009\uff1a\u9700\u8981\u65f6\u56de\u9000<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Java_%E4%B8%8B%E8%BD%BD%E5%9C%B0%E5%9D%80\"><\/span>Java \u4e0b\u8f7d\u5730\u5740<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u6765\u6e90<\/th><th>\u5730\u5740<\/th><\/tr><\/thead><tbody><tr><td>\u5b98\u65b9\u53d1\u5e03\u9875<\/td><td><a href=\"https:\/\/github.com\/adoptium\/temurin21-binaries\/releases\/tag\/jdk-21.0.12.1%2B1\">Temurin 21.0.12.1<\/a><\/td><\/tr><tr><td>\u5b98\u65b9\u5b89\u88c5\u5305<\/td><td><a href=\"https:\/\/github.com\/adoptium\/temurin21-binaries\/releases\/download\/jdk-21.0.12.1%2B1\/OpenJDK21U-jre_x64_windows_hotspot_21.0.12.1_1.zip\">Windows x64 JRE ZIP<\/a><\/td><\/tr><tr><td>\u56fd\u5185\u955c\u50cf\u4e00<\/td><td><a href=\"https:\/\/mirrors.tuna.tsinghua.edu.cn\/Adoptium\/21\/jre\/x64\/windows\/\">\u6e05\u534e\u5927\u5b66<\/a><\/td><\/tr><tr><td>\u56fd\u5185\u955c\u50cf\u4e8c<\/td><td><a href=\"https:\/\/mirror.nju.edu.cn\/adoptium\/21\/jre\/x64\/windows\/\">\u5357\u4eac\u5927\u5b66<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u8f7d\u987a\u5e8f\uff1a\u5b98\u65b9 \u2192 \u6e05\u534e \u2192 \u5357\u4eac\u5927\u5b66\u3002\u5b98\u65b9\u8fde\u7eed 5 \u79d2\u5e73\u5747\u901f\u5ea6\u4f4e\u4e8e <strong>1 MiB\/s\uff08\u7ea6 1 MB\/s\uff09<\/strong>\uff0c\u6216 <strong>30 \u79d2\u5185\u6ca1\u6709\u4e0b\u8f7d\u5b8c<\/strong>\uff0c\u81ea\u52a8\u5207\u6362\u56fd\u5185\u955c\u50cf\u3002\u56fd\u5185\u955c\u50cf\u6bcf\u4e2a\u6700\u591a\u7b49\u5f85 1800 \u79d2\uff1b\u8fde\u63a5\u5931\u8d25\u6216 SHA256 \u4e0d\u7b26\u5219\u5c1d\u8bd5\u4e0b\u4e00\u6e90\u3002\u5df2\u6709\u6821\u9a8c\u901a\u8fc7\u7684\u5b89\u88c5\u5305\u4f1a\u76f4\u63a5\u590d\u7528\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%95%85%E9%9A%9C%E6%B8%85%E5%8D%95\"><\/span>\u6545\u969c\u6e05\u5355<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7f16\u53f7<\/th><th>\u65e5\u671f<\/th><th>\u6545\u969c\u73b0\u8c61<\/th><th>\u5b9a\u4f4d\u7ed3\u679c<\/th><th>\u5904\u7406\u7ed3\u679c<\/th><\/tr><\/thead><tbody><tr><td>001<\/td><td>2026-10-20<\/td><td>\u5821\u5792\u673a DBeaver \u53cd\u590d\u5d29\u6e83\uff0c\u6301\u7eed\u4ea7\u751f\u5927\u4f53\u79ef <code>.mdmp<\/code> \u6587\u4ef6<\/td><td>Java 21.0.5 \u7684 AWT \u56fe\u5f62\u6a21\u5757\u5728\u5904\u7406\u663e\u793a\u8bbe\u5907\u53d8\u5316\u65f6\u5d29\u6e83\uff0c\u4e0e\u8fdc\u7a0b\u684c\u9762\u663e\u793a\u5207\u6362\u76f8\u5173\u7f3a\u9677\u543b\u5408<\/td><td>\u5355\u72ec\u5207\u6362\u81f3 Java 21.0.12.1\uff1b\u5b9e\u9645 JVM \u8def\u5f84\u5df2\u6838\u5bf9\uff0c\u591a\u6b21\u8fdc\u7a0b\u684c\u9762\u65ad\u5f00\u3001\u91cd\u8fde\u540e\u672a\u65b0\u589e\u5d29\u6e83\u6587\u4ef6\uff1b\u5220\u9664 132 \u4e2a\u5386\u53f2\u5d29\u6e83\u6587\u4ef6\uff0c\u91ca\u653e 36.51 GiB<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"001_%E5%A0%A1%E5%9E%92%E6%9C%BA_DBeaver_%E5%B4%A9%E6%BA%83%E5%8F%8A%E8%BD%AC%E5%82%A8%E6%96%87%E4%BB%B6%E5%A2%9E%E9%95%BF\"><\/span>001 \u5821\u5792\u673a DBeaver \u5d29\u6e83\u53ca\u8f6c\u50a8\u6587\u4ef6\u589e\u957f<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_%E7%8E%AF%E5%A2%83%E5%92%8C%E5%8E%9F%E5%9B%A0\"><\/span>1. \u73af\u5883\u548c\u539f\u56e0<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u9879\u76ee<\/th><th>\u672c\u6b21\u4fe1\u606f<\/th><\/tr><\/thead><tbody><tr><td>\u670d\u52a1\u5668<\/td><td><code>iZknjq99u9wk14Z<\/code>\uff0c\u5185\u7f51 IP <code>172.19.223.223<\/code><\/td><\/tr><tr><td>\u7cfb\u7edf<\/td><td>Windows Server 2025 Datacenter\uff0c64 \u4f4d<\/td><\/tr><tr><td>DBeaver<\/td><td>25.2.0\uff0c\u5b89\u88c5\u5728\u5f53\u524d Administrator \u7528\u6237\u76ee\u5f55<\/td><\/tr><tr><td>\u539f Java<\/td><td>DBeaver \u81ea\u5e26 Temurin 21.0.5<\/td><\/tr><tr><td>\u65b0 Java<\/td><td>Temurin 21.0.12.1<\/td><\/tr><tr><td>\u6545\u969c\u4ee3\u7801<\/td><td><code>EXCEPTION_ACCESS_VIOLATION (0xc0000005)<\/code><\/td><\/tr><tr><td>\u6545\u969c\u6a21\u5757<\/td><td><code>awt.dll<\/code>\uff0c\u7ebf\u7a0b <code>AWT-EventQueue-0<\/code><\/td><\/tr><tr><td>\u5173\u952e\u8c03\u7528\u6808<\/td><td><code>Win32GraphicsConfig.getBounds<\/code>\u3001<code>Win32GraphicsDevice.initNativeScale<\/code>\u3001<code>displayChanged<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">DBeaver \u8981\u6c42 Java 21\uff0c\u539f Java \u7684\u4e3b\u7248\u672c\u7b26\u5408\u8981\u6c42\u3002\u672c\u6b21\u5904\u7406\u9488\u5bf9\u65e7 Java \u8865\u4e01\u4e2d\u7684\u56fe\u5f62\u6a21\u5757\u95ee\u9898\uff0c\u4e0d\u9700\u8981\u8c03\u6574\u9879\u76ee\u4ee3\u7801\u6216\u6570\u636e\u5e93\u914d\u7f6e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u64cd\u4f5c\u65b9\u5f0f\uff1a\u4e0b\u8f7d\u65b0 Java \u2192 \u89e3\u538b\u5230 DBeaver \u7684 <code>runtimes<\/code> \u2192 \u5728 <code>dbeaver.ini<\/code> \u4e2d\u6307\u5b9a\u65b0 Java \u2192 \u91cd\u542f DBeaver \u751f\u6548\u3002\u6ca1\u6709\u4fee\u6539\u7cfb\u7edf <code>PATH<\/code>\u3001<code>JAVA_HOME<\/code> \u6216 PyCharm\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>runtimes<\/code> \u662f\u672c\u6b21\u4fee\u590d\u521b\u5efa\u7684\u76ee\u5f55\uff0c\u9700\u8981\u4fdd\u7559\u3002\u6b63\u5e38\u542f\u52a8\u8fd9\u4efd DBeaver\uff0c\u5305\u62ec\u670d\u52a1\u5668\u91cd\u542f\u540e\uff0c\u90fd\u4f1a\u7ee7\u7eed\u4f7f\u7528\u914d\u7f6e\u6307\u5b9a\u7684\u65b0 Java\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_%E6%8E%92%E6%9F%A5%E5%91%BD%E4%BB%A4\"><\/span>2. \u6392\u67e5\u547d\u4ee4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5821\u5792\u673a\u4e0a\u6253\u5f00\u7ba1\u7406\u5458 PowerShell\u3002\u4ee5\u4e0b\u8def\u5f84\u9488\u5bf9\u672c\u6b21\u673a\u5668\uff0c\u5176\u4ed6\u673a\u5668\u4f7f\u7528\u65f6\u5148\u8c03\u6574\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b63\u5e38\u5904\u7406\u6309\u7b2c 2\uff5e6 \u8282\u7684 PowerShell \u4ee3\u7801\u5757\u9010\u6bb5\u6267\u884c\uff0c\u4f7f\u7528\u540c\u4e00\u4e2a\u7a97\u53e3\uff1b\u6807\u4e3a <code>text<\/code> \u7684\u5185\u5bb9\u53ea\u662f\u8def\u5f84\u6216\u914d\u7f6e\u793a\u4f8b\uff0c\u4e0d\u9700\u8981\u6267\u884c\u3002\u56de\u9000\u662f\u6700\u540e\u5355\u72ec\u7684\u53ef\u9009\u64cd\u4f5c\uff0c\u9ed8\u8ba4\u8df3\u8fc7\u3002\u7b2c 3 \u6b65\u5931\u8d25\u5c31\u505c\u6b62\uff0c\u4e0d\u7ee7\u7eed\u6267\u884c\u540e\u9762\u7684\u6b65\u9aa4\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ErrorActionPreference = 'Stop'<br>$db = Join-Path $env:LOCALAPPDATA 'DBeaver'<br>$case = Join-Path $db '10.20\u6545\u969c\u6392\u67e5'<br>$jbrBin = 'C:\\Program Files\\JetBrains\\PyCharm 2024.1.7\\jbr\\bin'<br>$JavaReady = $false<br>$DBeaverVerified = $false<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u767b\u5f55\u7528\u6237\u548c\u5f53\u524d\u8fde\u63a5\uff0c\u907f\u514d\u64cd\u4f5c\u65f6\u5f71\u54cd\u5176\u4ed6\u4eba\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">quser<br>Get-NetTCPConnection -State Established | ForEach-Object {<br> &nbsp; &nbsp;[pscustomobject]@{<br> &nbsp; &nbsp; &nbsp; &nbsp;Process = (Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).ProcessName<br> &nbsp; &nbsp; &nbsp; &nbsp;PID = $_.OwningProcess<br> &nbsp; &nbsp; &nbsp; &nbsp;LocalPort = $_.LocalPort<br> &nbsp; &nbsp; &nbsp; &nbsp;RemoteIP = $_.RemoteAddress<br> &nbsp; &nbsp; &nbsp; &nbsp;RemotePort = $_.RemotePort<br> &nbsp; &nbsp;}<br>} | Sort-Object Process, RemoteIP | Format-Table -AutoSize<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fde\u63a5\u5b58\u5728\u4e0d\u7b49\u4e8e\u6b63\u5728\u6267\u884c SQL\u3002\u672c\u6b21\u53ea\u6709 Administrator \u4e00\u4e2a\u767b\u5f55\u4f1a\u8bdd\uff0c\u672a\u89c1\u660e\u663e\u7684\u5916\u90e8\u6570\u636e\u5e93\u8fde\u63a5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u7cfb\u7edf\u3001Java \u7248\u672c\u548c\u542f\u52a8\u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, OSArchitecture<br>$iniText = [IO.File]::ReadAllText(\"$db\\dbeaver.ini\")<br>$vm = [regex]::Match($iniText, '(?m)^[ \\t]*-vm[ \\t]*\\r?\\n([^\\r\\n]+)')<br>if ($vm.Success) {<br> &nbsp; &nbsp;$javaPath = $vm.Groups[1].Value.Trim().Trim('\"')<br> &nbsp; &nbsp;if (![IO.Path]::IsPathRooted($javaPath)) { $javaPath = Join-Path $db $javaPath }<br> &nbsp; &nbsp;$javaHome = Split-Path (Split-Path $javaPath -Parent) -Parent<br> &nbsp; &nbsp;if (!(Test-Path -LiteralPath \"$javaHome\\release\")) { throw '\u8bf7\u6838\u5bf9 -vm \u6307\u5b9a\u7684 Java \u8def\u5f84\u3002' }<br> &nbsp; &nbsp;Get-Content -LiteralPath \"$javaHome\\release\" |<br> &nbsp; &nbsp; &nbsp; &nbsp;Select-String '^(JAVA_VERSION|IMPLEMENTOR|OS_ARCH)='<br>} elseif (Test-Path -LiteralPath \"$db\\jre\\release\") {<br> &nbsp; &nbsp;Get-Content -LiteralPath \"$db\\jre\\release\" | Select-String '^(JAVA_VERSION|IMPLEMENTOR|OS_ARCH)='<br>} else { '\u672a\u627e\u5230\u9ed8\u8ba4 jre\uff0c\u8bf7\u6838\u5bf9\u4e0b\u9762\u7684\u542f\u52a8\u914d\u7f6e\u3002' }<br>$iniText<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u5d29\u6e83\u6587\u4ef6\u548c\u6700\u8fd1\u4e00\u6b21\u8c03\u7528\u6808\uff0c\u4e0d\u8981\u7528\u6587\u672c\u5de5\u5177\u6253\u5f00\u5927\u578b <code>.mdmp<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Get-ChildItem -LiteralPath $db -File | Where-Object Name -match '^hs_err_pid\\d+\\.(log|mdmp)$' |<br> &nbsp; &nbsp;Sort-Object LastWriteTime -Descending |<br> &nbsp; &nbsp;Select-Object Name, @{N='MB';E={[math]::Round($_.Length \/ 1MB, 2)}}, LastWriteTime<br>\u200b<br>$log = Get-ChildItem -LiteralPath $db -Filter 'hs_err_pid*.log' -File |<br> &nbsp; &nbsp;Sort-Object LastWriteTime -Descending | Select-Object -First 1<br>if ($log) {<br> &nbsp; &nbsp;Select-String -LiteralPath $log.FullName `<br> &nbsp; &nbsp; &nbsp; &nbsp;-Pattern '^#.*JRE version:|^#.*Problematic frame:|^Current thread|^Java frames:' `<br> &nbsp; &nbsp; &nbsp; &nbsp;-Context 0, 25 | Out-String -Width 240<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6b21\u6700\u65b0\u65e5\u5fd7\u4f7f\u7528\u7684\u662f DBeaver \u81ea\u5e26 Java 21.0.5\uff0c\u4e0d\u662f PyCharm \u7684 Java 17\u3002\u4ec5\u51ed\u6587\u4ef6\u4fdd\u5b58\u5728 PyCharm \u76ee\u5f55\u4e0b\uff0c\u4e0d\u80fd\u786e\u5b9a\u662f\u54ea\u4e2a\u7a0b\u5e8f\u5d29\u6e83\uff0c\u5e94\u770b\u5bf9\u5e94 <code>.log<\/code>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%88%87%E6%8D%A2_Java\"><\/span>3. \u4e0b\u8f7d\u5e76\u5207\u6362 Java<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u9996\u6b21\u5207\u6362\u524d\u4fdd\u5b58\u5de5\u4f5c\u5e76\u9000\u51fa DBeaver\uff0c\u7136\u540e\u6267\u884c\u4e0b\u9762\u6574\u6bb5\u3002\u5df2\u914d\u7f6e\u672c\u6b21\u65b0 Java \u65f6\u76f4\u63a5\u8df3\u8fc7\uff0c\u4e0d\u9700\u8981\u9000\u51fa\uff0c\u4e5f\u4e0d\u91cd\u590d\u4e0b\u8f7d\u6216\u5207\u6362\u3002\u4e0b\u8f7d\u3001\u6821\u9a8c\u6216 Java \u68c0\u67e5\u5931\u8d25\u90fd\u4f1a\u505c\u6b62\uff0c\u4e0d\u4fee\u6539\u542f\u52a8\u914d\u7f6e\u3002\u6bcf\u6b21\u9996\u6b21\u89e3\u538b\u4f7f\u7528\u72ec\u7acb\u7684\u65b0\u76ee\u5f55\uff0c\u4e0d\u8986\u76d6\u6216\u79fb\u52a8\u4efb\u4f55\u5df2\u6709 Java\u3002\u4ee5\u540e\u66f4\u6362\u7248\u672c\u65f6\uff0c\u4e09\u4e2a\u4e0b\u8f7d\u5730\u5740\u3001\u7248\u672c\u68c0\u67e5\u548c\u5b98\u65b9 SHA256 \u8981\u4e00\u8d77\u66f4\u65b0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$JavaReady = $false<br>$DBeaverVerified = $false<br>&amp; {<br> &nbsp; &nbsp;$ErrorActionPreference = 'Stop'<br> &nbsp; &nbsp;$ini = Join-Path $db 'dbeaver.ini'<br> &nbsp; &nbsp;if (!(Test-Path -LiteralPath $ini)) { throw '\u672a\u627e\u5230 DBeaver \u914d\u7f6e\u3002' }<br> &nbsp; &nbsp;$text = [IO.File]::ReadAllText($ini)<br> &nbsp; &nbsp;$currentVm = [regex]::Match($text, '(?m)^[ \\t]*-vm[ \\t]*\\r?\\n([^\\r\\n]+)')<br> &nbsp; &nbsp;if ($currentVm.Success) {<br> &nbsp; &nbsp; &nbsp; &nbsp;$currentJava = $currentVm.Groups[1].Value.Trim().Trim('\"')<br> &nbsp; &nbsp; &nbsp; &nbsp;if (![IO.Path]::IsPathRooted($currentJava)) { $currentJava = Join-Path $db $currentJava }<br> &nbsp; &nbsp; &nbsp; &nbsp;$currentJava = [IO.Path]::GetFullPath($currentJava)<br> &nbsp; &nbsp; &nbsp; &nbsp;$currentHome = Split-Path (Split-Path $currentJava -Parent) -Parent<br> &nbsp; &nbsp; &nbsp; &nbsp;if ($currentJava.StartsWith(\"$db\\runtimes\\\", [StringComparison]::OrdinalIgnoreCase) -and<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(Test-Path -LiteralPath $currentJava) -and<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(Test-Path -LiteralPath \"$currentHome\\release\") -and<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(Select-String -LiteralPath \"$currentHome\\release\" -Pattern '^JAVA_VERSION=\"21\\.0\\.12\\.1(?:\\+[^\\\"]*)?\"' -Quiet)) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Write-Host \"\u5df2\u914d\u7f6e\u65b0 Java\uff0c\u4fdd\u7559\u539f\u4f4d\u5e76\u8df3\u8fc7\u5207\u6362\uff1a$currentJava\"<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$script:JavaReady = $true<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return<br> &nbsp; &nbsp; &nbsp; &nbsp;}<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;if (Get-Process -Name dbeaver,dbeaver-cli -ErrorAction SilentlyContinue) {<br> &nbsp; &nbsp; &nbsp; &nbsp;throw '\u8bf7\u5148\u9000\u51fa DBeaver\u3002'<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;if ((Test-Path -LiteralPath $case) -and<br> &nbsp; &nbsp; &nbsp; &nbsp;((Get-Item -LiteralPath $case).Attributes -band [IO.FileAttributes]::ReparsePoint)) {<br> &nbsp; &nbsp; &nbsp; &nbsp;throw '\u8d44\u6599\u76ee\u5f55\u662f\u94fe\u63a5\uff0c\u8bf7\u5148\u6838\u5bf9\u8def\u5f84\u3002'<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;New-Item -ItemType Directory -Path $case -Force | Out-Null<br> &nbsp; &nbsp;$curl = (Get-Command curl.exe -ErrorAction Stop).Source<br> &nbsp; &nbsp;$name = 'OpenJDK21U-jre_x64_windows_hotspot_21.0.12.1_1.zip'<br> &nbsp; &nbsp;$zip = Join-Path $case $name<br> &nbsp; &nbsp;$expected = 'D35F31E712F0FCF6AC5A093EDC90204FBFF22F720BA3950BD09D331D5E621636'<br> &nbsp; &nbsp;$sources = @(<br> &nbsp; &nbsp; &nbsp; &nbsp;@{Name='\u5b98\u65b9'; Url=\"https:\/\/github.com\/adoptium\/temurin21-binaries\/releases\/download\/jdk-21.0.12.1%2B1\/$name\"; Timeout=30; CheckSpeed=$true}<br> &nbsp; &nbsp; &nbsp; &nbsp;@{Name='\u6e05\u534e'; Url=\"https:\/\/mirrors.tuna.tsinghua.edu.cn\/Adoptium\/21\/jre\/x64\/windows\/$name\"; Timeout=1800; CheckSpeed=$false}<br> &nbsp; &nbsp; &nbsp; &nbsp;@{Name='\u5357\u4eac\u5927\u5b66'; Url=\"https:\/\/mirror.nju.edu.cn\/adoptium\/21\/jre\/x64\/windows\/$name\"; Timeout=1800; CheckSpeed=$false}<br> &nbsp; &nbsp;)<br>\u200b<br> &nbsp; &nbsp;function Get-JavaPackage {<br> &nbsp; &nbsp; &nbsp; &nbsp;param($Sources, $Zip, $Expected, $Curl)<br> &nbsp; &nbsp; &nbsp; &nbsp;if ((Test-Path -LiteralPath $Zip) -and<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(Get-FileHash -LiteralPath $Zip -Algorithm SHA256).Hash -eq $Expected) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Write-Host \"\u590d\u7528\u5df2\u6821\u9a8c\u7684\u5b89\u88c5\u5305\uff1a$Zip\"<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return<br> &nbsp; &nbsp; &nbsp; &nbsp;}<br> &nbsp; &nbsp; &nbsp; &nbsp;$part = \"$Zip.part\"<br> &nbsp; &nbsp; &nbsp; &nbsp;$errorFile = \"$Zip.download-error.txt\"<br> &nbsp; &nbsp; &nbsp; &nbsp;foreach ($source in $Sources) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Write-Host \"\u6b63\u5728\u4ece$($source.Name)\u4e0b\u8f7d\u2026\u2026\"<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curlArgs = @('--fail', '--location', '--silent', '--show-error',<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'--stderr', $errorFile, '--connect-timeout', '10',<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'--max-time', [string]$source.Timeout, '--output', $part)<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ($source.CheckSpeed) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curlArgs += @('--speed-limit', '1048576', '--speed-time', '5')<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$PSNativeCommandUseErrorActionPreference = $false<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp; $Curl @curlArgs $source.Url<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$exitCode = $LASTEXITCODE<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ($exitCode -eq 0 -and (Test-Path -LiteralPath $part) -and<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(Get-FileHash -LiteralPath $part -Algorithm SHA256).Hash -eq $Expected) {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Move-Item -LiteralPath $part -Destination $Zip -Force<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Write-Host \"$($source.Name)\u4e0b\u8f7d\u5b8c\u6210\uff0cSHA256 \u6821\u9a8c\u901a\u8fc7\u3002\"<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (Test-Path -LiteralPath $part) { Remove-Item -LiteralPath $part -Force }<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Write-Host \"$($source.Name)\u4e0b\u8f7d\u5931\u8d25\u3001\u8d85\u65f6\u3001\u901f\u5ea6\u4e0d\u8db3\u6216\u6821\u9a8c\u4e0d\u7b26\uff0c\u5c1d\u8bd5\u4e0b\u4e00\u6e90\u3002\"<br> &nbsp; &nbsp; &nbsp; &nbsp;}<br> &nbsp; &nbsp; &nbsp; &nbsp;throw \"\u6240\u6709\u6765\u6e90\u5747\u672a\u53d6\u5f97\u6821\u9a8c\u901a\u8fc7\u7684\u5b89\u88c5\u5305\uff0c\u672a\u4fee\u6539\u914d\u7f6e\u3002\u4e0b\u8f7d\u9519\u8bef\u89c1\uff1a$errorFile\"<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;Get-JavaPackage -Sources $sources -Zip $zip -Expected $expected -Curl $curl<br>\u200b<br> &nbsp; &nbsp;$stamp = Get-Date -Format 'yyyyMMdd_HHmmss_fff'<br> &nbsp; &nbsp;$target = Join-Path $db \"runtimes\\temurin21_$stamp\"<br> &nbsp; &nbsp;$runtimeRoot = Join-Path $db 'runtimes'<br> &nbsp; &nbsp;if ((Test-Path -LiteralPath $runtimeRoot) -and<br> &nbsp; &nbsp; &nbsp; &nbsp;((Get-Item -LiteralPath $runtimeRoot).Attributes -band [IO.FileAttributes]::ReparsePoint)) {<br> &nbsp; &nbsp; &nbsp; &nbsp;throw 'runtimes \u662f\u94fe\u63a5\uff0c\u672a\u89e3\u538b\u6216\u4fee\u6539\u914d\u7f6e\u3002'<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;New-Item -ItemType Directory -Path $target | Out-Null<br> &nbsp; &nbsp;Expand-Archive -LiteralPath $zip -DestinationPath $target<br> &nbsp; &nbsp;$runtime = Get-ChildItem -LiteralPath $target -Directory | Where-Object {<br> &nbsp; &nbsp; &nbsp; &nbsp;Test-Path -LiteralPath (Join-Path $_.FullName 'bin\\javaw.exe')<br> &nbsp; &nbsp;} | Select-Object -First 1<br> &nbsp; &nbsp;if (!$runtime) { throw '\u89e3\u538b\u540e\u672a\u627e\u5230 Java\u3002' }<br> &nbsp; &nbsp;if (!(Select-String -LiteralPath \"$($runtime.FullName)\\release\" `<br> &nbsp; &nbsp; &nbsp; &nbsp;-Pattern '^JAVA_VERSION=\"21\\.0\\.12\\.1(?:\\+[^\\\"]*)?\"' -Quiet)) {<br> &nbsp; &nbsp; &nbsp; &nbsp;throw '\u89e3\u538b\u540e\u7684 Java \u7248\u672c\u4e0d\u7b26\uff0c\u672a\u4fee\u6539\u914d\u7f6e\u3002'<br> &nbsp; &nbsp;}<br>\u200b<br> &nbsp; &nbsp;$java = Join-Path $runtime.FullName 'bin\\java.exe'<br> &nbsp; &nbsp;$javaw = Join-Path $runtime.FullName 'bin\\javaw.exe'<br> &nbsp; &nbsp;$versionFile = Join-Path $target 'java-version.txt'<br> &nbsp; &nbsp;$test = Start-Process -FilePath $java -ArgumentList '-version' `<br> &nbsp; &nbsp; &nbsp; &nbsp;-WindowStyle Hidden -Wait -PassThru -RedirectStandardError $versionFile<br> &nbsp; &nbsp;Get-Content -LiteralPath $versionFile<br> &nbsp; &nbsp;if ($test.ExitCode -ne 0) { throw '\u65b0 Java \u542f\u52a8\u5931\u8d25\u3002' }<br>\u200b<br> &nbsp; &nbsp;$match = [regex]::Match($text, '(?m)^[ \\t]*-vmargs[ \\t]*\\r?$')<br> &nbsp; &nbsp;if (!$match.Success) { throw '\u672a\u627e\u5230 -vmargs\uff0c\u672a\u4fee\u6539\u914d\u7f6e\u3002' }<br> &nbsp; &nbsp;$before = $text.Substring(0, $match.Index)<br> &nbsp; &nbsp;$before = [regex]::Replace($before, '(?m)^[ \\t]*-vm[ \\t]*\\r?\\n[^\\r\\n]*(?:\\r?\\n|$)', '')<br> &nbsp; &nbsp;$newText = \"-vm`r`n$javaw`r`n\" + $before + $text.Substring($match.Index)<br> &nbsp; &nbsp;if (Get-Process -Name dbeaver,dbeaver-cli -ErrorAction SilentlyContinue) {<br> &nbsp; &nbsp; &nbsp; &nbsp;throw 'DBeaver \u5df2\u542f\u52a8\uff0c\u8bf7\u9000\u51fa\u540e\u91cd\u8bd5\u3002'<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;if ([IO.File]::ReadAllText($ini) -cne $text) { throw '\u914d\u7f6e\u5df2\u53d8\u5316\uff0c\u8bf7\u91cd\u8bd5\u3002' }<br>\u200b<br> &nbsp; &nbsp;$backup = Join-Path $case \"dbeaver.ini.before-java21-$stamp.bak\"<br> &nbsp; &nbsp;$temp = \"$ini.new-$stamp\"<br> &nbsp; &nbsp;[IO.File]::WriteAllText($temp, $newText, [Text.UTF8Encoding]::new($false))<br> &nbsp; &nbsp;$stateFile = Join-Path $case 'java21-repair.json'<br> &nbsp; &nbsp;$stateTemp = Join-Path $case \"java21-repair.new-$stamp.json\"<br> &nbsp; &nbsp;$state = @{<br> &nbsp; &nbsp; &nbsp; &nbsp;ChangedAtUtc = (Get-Date).ToUniversalTime().ToString('o')<br> &nbsp; &nbsp; &nbsp; &nbsp;JavaHome = $runtime.FullName<br> &nbsp; &nbsp; &nbsp; &nbsp;Backup = $backup<br> &nbsp; &nbsp; &nbsp; &nbsp;DBeaverRoot = $db<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;$state | ConvertTo-Json | Set-Content -LiteralPath $stateTemp -Encoding UTF8<br> &nbsp; &nbsp;if (Test-Path -LiteralPath $stateFile) {<br> &nbsp; &nbsp; &nbsp; &nbsp;Copy-Item -LiteralPath $stateFile -Destination \"$case\\java21-repair.before-$stamp.json\"<br> &nbsp; &nbsp;}<br> &nbsp; &nbsp;[IO.File]::Replace($temp, $ini, $backup)<br> &nbsp; &nbsp;Move-Item -LiteralPath $stateTemp -Destination $stateFile -Force<br> &nbsp; &nbsp;$script:JavaReady = $true<br> &nbsp; &nbsp;Write-Host \"\u5df2\u5207\u6362\uff1a$javaw\"<br> &nbsp; &nbsp;Write-Host \"\u914d\u7f6e\u5907\u4efd\uff1a$backup\"<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-vm<\/code> \u548c Java \u8def\u5f84\u5fc5\u987b\u5404\u5360\u4e00\u884c\uff0c\u653e\u5728 <code>-vmargs<\/code> \u524d\u9762\u3002\u914d\u7f6e\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-vm<br>C:\\Users\\Administrator\\AppData\\Local\\DBeaver\\runtimes\\temurin21_20261020_150658\\jdk-21.0.12.1+1-jre\\bin\\javaw.exe<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_%E5%90%AF%E5%8A%A8%E5%B9%B6%E9%AA%8C%E8%AF%81\"><\/span>4. \u542f\u52a8\u5e76\u9a8c\u8bc1<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5f00 DBeaver\uff0c\u6d4b\u8bd5\u6570\u636e\u5e93\u8fde\u63a5\u548c\u7b80\u5355\u67e5\u8be2\uff0c\u518d\u8fdb\u884c\u51e0\u6b21\u8fdc\u7a0b\u684c\u9762\u65ad\u5f00\u3001\u91cd\u8fde\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">if (!$JavaReady) { throw '\u7b2c 3 \u6b65\u672a\u6210\u529f\uff0c\u8bf7\u505c\u6b62\u540e\u7eed\u64cd\u4f5c\u3002' }<br>if (!(Get-Process -Name dbeaver -ErrorAction SilentlyContinue)) {<br> &nbsp; &nbsp;Start-Process -FilePath \"$db\\dbeaver.exe\" -WorkingDirectory $db<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b\u5b9e\u9645\u4f7f\u7528\u7684\u65b0 Java\u3002\u672c\u6b21 DBeaver \u542f\u52a8\u4e86\u5355\u72ec\u7684 <code>javaw.exe<\/code> \u5b50\u8fdb\u7a0b\uff0c\u56e0\u6b64\u4e0d\u80fd\u53ea\u68c0\u67e5 <code>dbeaver.exe<\/code> \u7684\u6a21\u5757\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$DBeaverVerified = $false<br>if (!$JavaReady) { throw '\u7b2c 3 \u6b65\u672a\u6210\u529f\uff0c\u8bf7\u505c\u6b62\u540e\u7eed\u64cd\u4f5c\u3002' }<br>$stateFile = \"$case\\java21-repair.json\"<br>if (!(Test-Path -LiteralPath $stateFile)) { $stateFile = \"$db\\java21-repair.json\" }<br>$state = Get-Content -LiteralPath $stateFile -Raw | ConvertFrom-Json<br>$javaw = Join-Path $state.JavaHome 'bin\\javaw.exe'<br>$vm = [regex]::Match([IO.File]::ReadAllText(\"$db\\dbeaver.ini\"), '(?m)^[ \\t]*-vm[ \\t]*\\r?\\n([^\\r\\n]+)')<br>if (!$vm.Success -or $vm.Groups[1].Value.Trim().Trim('\"') -ine $javaw) {<br> &nbsp; &nbsp;throw '\u542f\u52a8\u914d\u7f6e\u4e0e\u4fee\u590d\u8bb0\u5f55\u4e0d\u4e00\u81f4\uff0c\u8bf7\u6838\u5bf9\uff0c\u6682\u4e0d\u6e05\u7406\u6216\u6574\u7406\u3002'<br>}<br>$all = @(Get-CimInstance Win32_Process)<br>$ids = @($all | Where-Object Name -eq 'dbeaver.exe' | ForEach-Object ProcessId)<br>if (!$ids.Count) { throw 'DBeaver \u672a\u8fd0\u884c\uff0c\u8bf7\u6253\u5f00\u540e\u91cd\u8bd5\u3002' }<br>do {<br> &nbsp; &nbsp;$children = @($all | Where-Object {<br> &nbsp; &nbsp; &nbsp; &nbsp;$_.ParentProcessId -in $ids -and $_.ProcessId -notin $ids<br> &nbsp; &nbsp;} | ForEach-Object ProcessId)<br> &nbsp; &nbsp;$ids += $children<br>} while ($children.Count)<br>$javaProcesses = @($all | Where-Object {<br> &nbsp; &nbsp;$_.ProcessId -in $ids -and $_.Name -eq 'javaw.exe' -and $_.ExecutablePath -ieq $javaw<br>})<br>if (!$javaProcesses.Count) { throw '\u672a\u627e\u5230\u4f7f\u7528\u65b0 Java \u7684\u8fdb\u7a0b\uff0c\u9700\u7ee7\u7eed\u6838\u5bf9\u3002' }<br>$javaProcesses | Select-Object ProcessId, ParentProcessId, ExecutablePath<br>foreach ($p in $javaProcesses) {<br> &nbsp; &nbsp;(Get-Process -Id $p.ProcessId).Modules | Where-Object ModuleName -eq 'jvm.dll' |<br> &nbsp; &nbsp; &nbsp; &nbsp;Select-Object FileName<br>}<br>\u200b<br>$since = [datetimeoffset]::Parse($state.ChangedAtUtc).UtcDateTime<br>$newCrashes = @(Get-ChildItem -LiteralPath $db -File | Where-Object {<br> &nbsp; &nbsp;$_.Name -match '^hs_err_pid\\d+\\.(log|mdmp)$' -and $_.LastWriteTimeUtc -ge $since<br>})<br>if ($newCrashes.Count) {<br> &nbsp; &nbsp;$newCrashes | Select-Object Name, Length, LastWriteTime<br> &nbsp; &nbsp;throw '\u53d1\u73b0\u65b0\u7684\u5d29\u6e83\u6587\u4ef6\uff0c\u505c\u6b62\u6e05\u7406\u548c\u6574\u7406\uff0c\u7ee7\u7eed\u6392\u67e5\u3002'<br>} else {<br> &nbsp; &nbsp;'\u672a\u53d1\u73b0\u65b0\u7684\u5d29\u6e83\u6587\u4ef6\u3002'<br> &nbsp; &nbsp;$DBeaverVerified = $true<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6b21\u786e\u8ba4\u7684\u65b0 Java \u8def\u5f84\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">C:\\Users\\Administrator\\AppData\\Local\\DBeaver\\runtimes\\temurin21_20261020_150658\\jdk-21.0.12.1+1-jre<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_%E6%B8%85%E7%90%86%E5%8E%86%E5%8F%B2%E5%B4%A9%E6%BA%83%E6%96%87%E4%BB%B6\"><\/span>5. \u6e05\u7406\u5386\u53f2\u5d29\u6e83\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b8c\u6210\u4e0a\u9762\u7684\u9a8c\u8bc1\u540e\u6267\u884c\u3002\u53ea\u6e05\u7406\u4e24\u4e2a\u6307\u5b9a\u76ee\u5f55\u4e2d\u3001\u4fee\u590d\u65f6\u95f4\u4e4b\u524d\u7684 <code>hs_err_pid\u6570\u5b57.log\/.mdmp<\/code>\uff0c\u4e0d\u9012\u5f52\u3002\u6587\u672c\u65e5\u5fd7\u5148\u5907\u4efd\uff0c\u914d\u7f6e\u548c\u8f6f\u4ef6\u6587\u4ef6\u4fdd\u7559\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&amp; {<br>    $ErrorActionPreference = 'Stop'<br>    if (!$DBeaverVerified) { throw '\u8bf7\u5148\u5b8c\u6210\u7b2c 4 \u6b65\u9a8c\u8bc1\uff0c\u672a\u5220\u9664\u6587\u4ef6\u3002' }<br>    $stateFile = \"$case\\java21-repair.json\"<br>    if (!(Test-Path -LiteralPath $stateFile)) { $stateFile = \"$db\\java21-repair.json\" }<br>    $state = Get-Content -LiteralPath $stateFile -Raw | ConvertFrom-Json<br>    $vm = [regex]::Match([IO.File]::ReadAllText(\"$db\\dbeaver.ini\"), '(?m)^[ \\t]*-vm[ \\t]*\\r?\\n([^\\r\\n]+)')<br>    if (!$vm.Success -or $vm.Groups[1].Value.Trim().Trim('\"') -ine (Join-Path $state.JavaHome 'bin\\javaw.exe')) {<br>        throw 'Java \u914d\u7f6e\u5df2\u53d8\u5316\uff0c\u672a\u5220\u9664\u6587\u4ef6\u3002'<br>    }<br>    $since = [datetimeoffset]::Parse($state.ChangedAtUtc).UtcDateTime<br>    $files = @(foreach ($root in @($db, $jbrBin)) {<br>        if (Test-Path -LiteralPath $root) {<br>            Get-ChildItem -LiteralPath $root -File | Where-Object {<br>                $_.Name -match '^hs_err_pid\\d+\\.(log|mdmp)$'<br>            }<br>        }<br>    })<br>    if (@($files | Where-Object LastWriteTimeUtc -ge $since).Count) {<br>        throw '\u5b58\u5728\u4fee\u590d\u540e\u4ea7\u751f\u7684\u5d29\u6e83\u6587\u4ef6\uff0c\u5148\u6392\u67e5\uff0c\u6682\u4e0d\u6e05\u7406\u3002'<br>    }<br>    $old = @($files | Where-Object {<br>        $_.CreationTimeUtc -lt $since -and $_.LastWriteTimeUtc -lt $since -and<br>        !($_.Attributes -band [IO.FileAttributes]::ReparsePoint)<br>    })<br>    if (!$old.Count) { '\u6ca1\u6709\u9700\u8981\u6e05\u7406\u7684\u5386\u53f2\u5d29\u6e83\u6587\u4ef6\u3002'; return }<br>    $backup = Join-Path $case ('crash-backup_' + (Get-Date -Format 'yyyyMMdd_HHmmss_fff'))<br>    New-Item -ItemType Directory -Path $backup | Out-Null<br>    $old | Select-Object FullName, Length, LastWriteTimeUtc |<br>        Export-Csv \"$backup\\\u6e05\u7406\u6e05\u5355.csv\" -NoTypeInformation -Encoding UTF8<br>    $i = 0<br>    foreach ($file in ($old | Where-Object Extension -eq '.log')) {<br>        $i++<br>        Copy-Item -LiteralPath $file.FullName -Destination (<br>            Join-Path $backup (\"{0:D4}_{1}\" -f $i, $file.Name)<br>        )<br>    }<br>    $freed = [long]0<br>    $count = 0<br>    foreach ($file in $old) {<br>        $current = Get-Item -LiteralPath $file.FullName<br>        if ($current.Length -ne $file.Length -or<br>            $current.CreationTimeUtc -ne $file.CreationTimeUtc -or<br>            $current.LastWriteTimeUtc -ne $file.LastWriteTimeUtc) { continue }<br>        Remove-Item -LiteralPath $file.FullName -Force<br>        $freed += $file.Length<br>        $count++<br>    }<br>    '\u5220\u9664 {0} \u4e2a\u6587\u4ef6\uff0c\u91ca\u653e {1:N2} GiB\uff1b\u6587\u672c\u65e5\u5fd7\u5907\u4efd\uff1a{2}' -f $count, ($freed \/ 1GB), $backup<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u6b21\u5b9e\u9645\u5220\u9664 <strong>132 \u4e2a\u6587\u4ef6\uff0c\u91ca\u653e 36.51 GiB<\/strong>\u3002\u4fdd\u7559\u7684\u6587\u672c\u65e5\u5fd7\u3001\u6e05\u5355\u7ea6 <strong>6.35 MB<\/strong>\uff0c\u914d\u7f6e\u5907\u4efd <strong>1.43 KB<\/strong>\uff0c\u4fee\u590d\u8bb0\u5f55 <strong>0.3 KB<\/strong>\uff1b\u53e6\u4fdd\u7559\u539f Java <strong>54.48 MB<\/strong>\u3001\u4e0b\u8f7d\u5305 <strong>46.73 MB<\/strong>\uff0c\u5408\u8ba1\u7ea6 <strong>107.56 MB<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"6_%E8%B5%84%E6%96%99%E6%95%B4%E7%90%86%E5%92%8C%E5%9B%9E%E9%80%80\"><\/span>6. \u8d44\u6599\u6574\u7406\u548c\u56de\u9000<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7edf\u4e00\u8d44\u6599\u76ee\u5f55\u53ca\u4e3b\u8981\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">C:\\Users\\Administrator\\AppData\\Local\\DBeaver\\10.20\u6545\u969c\u6392\u67e5<br>\u251c\u2500 crash-backup_20261020_151514\\       \u6587\u672c\u65e5\u5fd7\u53ca\u6e05\u7406\u6e05\u5355<br>\u251c\u2500 dbeaver.ini.before-java21-20261020_150658.bak<br>\u251c\u2500 java21-repair.json<br>\u251c\u2500 \u65e7Java_jre\\                       \u539f Java\uff0c\u7528\u4e8e\u56de\u9000<br>\u2514\u2500 OpenJDK21U-jre_x64_windows_hotspot_21.0.12.1_1.zip<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6574\u7406\u73b0\u6709\u8d44\u6599\u65f6\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1b\u5df2\u6574\u7406\u7684\u9879\u76ee\u4f1a\u8df3\u8fc7\uff0c\u76ee\u6807\u5b58\u5728\u65f6\u4fdd\u7559\u53cc\u65b9\u3001\u4e0d\u8986\u76d6\u3002\u53ea\u6536\u96c6\u6839\u76ee\u5f55\u7684\u65e5\u5fd7\u5907\u4efd\u3001\u914d\u7f6e\u5907\u4efd\u3001\u4fee\u590d\u8bb0\u5f55\u3001\u672a\u4f7f\u7528\u7684\u539f <code>jre<\/code> \u548c\u672c\u6b21\u4e0b\u8f7d\u5305\u3002\u5f53\u524d <code>runtimes<\/code> \u548c\u6b63\u5728\u4f7f\u7528\u7684 <code>dbeaver.ini<\/code> \u4fdd\u6301\u539f\u4f4d\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&amp; {<br>    $ErrorActionPreference = 'Stop'<br>    if (!$DBeaverVerified) { throw '\u8bf7\u5148\u5b8c\u6210\u7b2c 4 \u6b65\u9a8c\u8bc1\uff0c\u672a\u79fb\u52a8\u8d44\u6599\u3002' }<br>    if ((Test-Path -LiteralPath $case) -and<br>        ((Get-Item -LiteralPath $case).Attributes -band [IO.FileAttributes]::ReparsePoint)) {<br>        throw '\u8d44\u6599\u76ee\u5f55\u662f\u94fe\u63a5\uff0c\u672a\u79fb\u52a8\u8d44\u6599\u3002'<br>    }<br>    $stateFile = \"$case\\java21-repair.json\"<br>    if (!(Test-Path -LiteralPath $stateFile)) { $stateFile = \"$db\\java21-repair.json\" }<br>    $state = Get-Content -LiteralPath $stateFile -Raw | ConvertFrom-Json<br>    $javaw = Join-Path $state.JavaHome 'bin\\javaw.exe'<br>    $vm = [regex]::Match([IO.File]::ReadAllText(\"$db\\dbeaver.ini\"), '(?m)^[ \\t]*-vm[ \\t]*\\r?\\n([^\\r\\n]+)')<br>    if (!$vm.Success -or $vm.Groups[1].Value.Trim().Trim('\"') -ine $javaw -or<br>        !$javaw.StartsWith(\"$db\\runtimes\\\", [StringComparison]::OrdinalIgnoreCase)) {<br>        throw '\u672a\u786e\u8ba4\u914d\u7f6e\u4f7f\u7528 runtimes \u5185\u7684\u65b0 Java\uff0c\u505c\u6b62\u6574\u7406\u3002'<br>    }<br>    $oldUsers = @(Get-CimInstance Win32_Process | Where-Object {<br>        $_.ExecutablePath -and $_.ExecutablePath.StartsWith(<br>            \"$db\\jre\\\", [StringComparison]::OrdinalIgnoreCase)<br>    })<br>    if ($oldUsers.Count) { throw '\u539f jre \u4ecd\u6709\u8fdb\u7a0b\u4f7f\u7528\uff0c\u505c\u6b62\u6574\u7406\u3002' }<br>    New-Item -ItemType Directory -Path $case -Force | Out-Null<br>    $sources = @(Get-ChildItem -LiteralPath $db -Directory -Filter 'crash-backup_*' |<br>        ForEach-Object FullName)<br>    $sources += @(Get-ChildItem -LiteralPath $db -File -Filter 'dbeaver.ini.before-java21-*.bak' |<br>        ForEach-Object FullName)<br>    $download = Join-Path $env:USERPROFILE 'Downloads\\DBeaver-Java21_20261020_150050\\OpenJDK21U-jre_x64_windows_hotspot_21.0.12.1_1.zip'<br>    $sources += @(\"$db\\java21-repair.json\", \"$db\\jre\", $download)<br>    $stamp = Get-Date -Format 'yyyyMMdd_HHmmss_fff'<br>    foreach ($source in $sources) {<br>        if (!(Test-Path -LiteralPath $source)) { continue }<br>        $name = Split-Path $source -Leaf<br>        if ($name -eq 'jre') { $name = '\u65e7Java_jre' }<br>        if ($name -eq 'java21-repair.json' -and (Test-Path -LiteralPath \"$case\\java21-repair.json\")) {<br>            $name = \"java21-repair.root-copy-$stamp.json\"<br>        }<br>        $target = Join-Path $case $name<br>        $sourceFull = (Resolve-Path -LiteralPath $source).ProviderPath<br>        $targetFull = [IO.Path]::GetFullPath($target)<br>        if (!$targetFull.StartsWith(\"$case\\\", [StringComparison]::OrdinalIgnoreCase) -or<br>            (!$sourceFull.StartsWith(\"$db\\\", [StringComparison]::OrdinalIgnoreCase) -and $sourceFull -ine $download)) {<br>            throw '\u6574\u7406\u8def\u5f84\u8d8a\u754c\u3002'<br>        }<br>        if ($sourceFull -ine [IO.Path]::GetFullPath($source) -or<br>            ((Get-Item -LiteralPath $source).Attributes -band [IO.FileAttributes]::ReparsePoint)) {<br>            throw \"\u6e90\u8def\u5f84\u4e0d\u7b26\u5408\u9884\u671f\uff1a$source\"<br>        }<br>        if (Test-Path -LiteralPath $target) { Write-Host \"\u76ee\u6807\u5df2\u5b58\u5728\uff0c\u4fdd\u7559\u53cc\u65b9\uff1a$target\"; continue }<br>        Move-Item -LiteralPath $sourceFull -Destination $targetFull<br>    }<br>    $archivedBackup = Join-Path $case (Split-Path $state.Backup -Leaf)<br>    if ($state.Backup -ine $archivedBackup -and (Test-Path -LiteralPath $archivedBackup)) {<br>        if (!(Test-Path -LiteralPath $state.Backup) -or<br>            (Get-FileHash -LiteralPath $state.Backup).Hash -eq (Get-FileHash -LiteralPath $archivedBackup).Hash) {<br>            $state.Backup = $archivedBackup<br>            $state | ConvertTo-Json | Set-Content \"$case\\java21-repair.json\" -Encoding UTF8<br>        }<br>    }<br>    Get-ChildItem -LiteralPath $case | Select-Object Name, Mode<br>}<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%8F%AF%E9%80%89%EF%BC%9A%E9%9C%80%E8%A6%81%E6%97%B6%E5%9B%9E%E9%80%80\"><\/span>\u53ef\u9009\uff1a\u9700\u8981\u65f6\u56de\u9000<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b63\u5e38\u5904\u7406\u4e0d\u6267\u884c\u56de\u9000\u3002\u4e0b\u9762\u9ed8\u8ba4 <code>$RunRollback = $false<\/code>\uff0c\u6309\u987a\u5e8f\u590d\u5236\u4e5f\u53ea\u4f1a\u63d0\u793a\u8df3\u8fc7\uff1b\u53ea\u6709\u9700\u8981\u6062\u590d\u65e7 Java \u65f6\uff0c\u624d\u6539\u6210 <code>$true<\/code>\uff0c\u5e76\u5148\u4fdd\u5b58\u5de5\u4f5c\u3001\u9000\u51fa DBeaver\u3002\u56de\u9000\u4e0d\u5220\u9664\u6216\u79fb\u52a8\u65b0 Java\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&amp; {<br>    $ErrorActionPreference = 'Stop'<br>    $RunRollback = $false<br>    if (!$RunRollback) { '\u6b63\u5e38\u6d41\u7a0b\u8df3\u8fc7\u56de\u9000\u3002'; return }<br>    $state = Get-Content \"$case\\java21-repair.json\" -Raw | ConvertFrom-Json<br>    $active = @(Get-CimInstance Win32_Process | Where-Object {<br>        $_.Name -match '^dbeaver.*\\.exe$' -or<br>        ($_.ExecutablePath -and $_.ExecutablePath.StartsWith(<br>            \"$($state.JavaHome)\\\", [StringComparison]::OrdinalIgnoreCase))<br>    })<br>    if ($active.Count) { throw '\u8bf7\u5148\u4fdd\u5b58\u5de5\u4f5c\u5e76\u9000\u51fa DBeaver\u3002' }<br>    if (!(Test-Path -LiteralPath $state.Backup)) { throw '\u627e\u4e0d\u5230\u539f\u914d\u7f6e\u5907\u4efd\u3002' }<br>    $backupText = [IO.File]::ReadAllText($state.Backup)<br>    if ([IO.File]::ReadAllText(\"$db\\dbeaver.ini\") -ceq $backupText) {<br>        '\u5f53\u524d\u914d\u7f6e\u5df2\u4e0e\u539f\u5907\u4efd\u4e00\u81f4\uff0c\u65e0\u9700\u91cd\u590d\u56de\u9000\u3002'; return<br>    }<br>    $oldJava = Join-Path $case '\u65e7Java_jre'<br>    $originalJava = Join-Path $db 'jre'<br>    $backupVm = [regex]::Match($backupText, '(?m)^[ \\t]*-vm[ \\t]*\\r?\\n([^\\r\\n]+)')<br>    if (!$backupVm.Success -and !(Test-Path -LiteralPath \"$originalJava\\bin\\javaw.exe\")) {<br>        if (!(Test-Path -LiteralPath \"$oldJava\\bin\\javaw.exe\")) { throw '\u539f Java \u4e0d\u5b8c\u6574\uff0c\u672a\u56de\u9000\u3002' }<br>        if (Test-Path -LiteralPath $originalJava) { throw '\u539f jre \u4f4d\u7f6e\u5df2\u6709\u5185\u5bb9\uff0c\u8bf7\u5148\u6838\u5bf9\u3002' }<br>        if ((Split-Path ([IO.Path]::GetFullPath($oldJava)) -Parent) -ine $case -or<br>            (Split-Path ([IO.Path]::GetFullPath($originalJava)) -Parent) -ine $db) {<br>            throw 'Java \u56de\u9000\u8def\u5f84\u8d8a\u754c\u3002'<br>        }<br>        Move-Item -LiteralPath $oldJava -Destination $originalJava<br>    }<br>    if ($backupVm.Success) {<br>        $backupJava = $backupVm.Groups[1].Value.Trim().Trim('\"')<br>        if (![IO.Path]::IsPathRooted($backupJava)) { $backupJava = Join-Path $db $backupJava }<br>        if (!(Test-Path -LiteralPath $backupJava)) { throw '\u5907\u4efd\u6307\u5b9a\u7684 Java \u4e0d\u5b58\u5728\uff0c\u672a\u56de\u9000\u3002' }<br>    }<br>    Copy-Item -LiteralPath \"$db\\dbeaver.ini\" -Destination (<br>        Join-Path $case ('dbeaver.ini.\u56de\u9000\u524d_' + (Get-Date -Format 'yyyyMMdd_HHmmss_fff') + '.bak')<br>    )<br>    Copy-Item -LiteralPath $state.Backup -Destination \"$db\\dbeaver.ini\" -Force<br>    '\u5df2\u6062\u590d\u539f\u914d\u7f6e\u548c\u539f Java\uff0c\u91cd\u65b0\u6253\u5f00 DBeaver \u751f\u6548\u3002'<br>}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u76f8\u5173\u53c2\u8003\uff1a<a href=\"https:\/\/github.com\/openjdk\/jdk21u-dev\/pull\/1359\">OpenJDK Windows AWT \u4fee\u590d\u8bb0\u5f55<\/a>\u3001<a href=\"https:\/\/dbeaver.com\/docs\/dbeaver\/Log-files\/\">DBeaver Java \u5d29\u6e83\u65e5\u5fd7\u8bf4\u660e<\/a>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Java \u4e0b\u8f7d\u5730\u5740 \u6765\u6e90 \u5730\u5740 \u5b98\u65b9\u53d1\u5e03\u9875 Temurin 21.0.12.1 \u5b98\u65b9\u5b89\u88c5\u5305 Windows x [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3315","post","type-post","status-publish","format-standard","hentry","category-vxhs888p"],"_links":{"self":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts\/3315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3315"}],"version-history":[{"count":1,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts\/3315\/revisions"}],"predecessor-version":[{"id":3316,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=\/wp\/v2\/posts\/3315\/revisions\/3316"}],"wp:attachment":[{"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxjk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}