(filePath: string)
| 212 | function getJavaSize() { |
| 213 | const v = [ |
| 214 | "/usr/lib/jvm", |
| 215 | "C:/Program Files/Java", |
| 216 | "/Library/Java/JavaVirtualMachines", |
| 217 | "C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/21.0.7-6.0/x64", |
| 218 | "/opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.7-6/x64", |
| 219 | "/Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.7-6.0/x64/Contents/Home", |
| 220 | "/Users/runner/hostedtoolcache/Java_Temurin-Hotspot_jdk/21.0.7-6.0/arm64/Contents/Home", |
| 221 | ]; |
| 222 | |
| 223 | for (const i of v) { |
| 224 | try { |
| 225 | const n = +execSync(`du -s "${i}"`).toString().split("\t")[0].split( |
| 226 | " ", |
| 227 | )[0]; |
| 228 | if (n > 0) { |
| 229 | return n * 1000; |
| 230 | } |
| 231 | } catch (e) { |
| 232 | // console.error('error: ', e.me) |
no test coverage detected