MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / getPrismJavaBundle

Function getPrismJavaBundle

launcher/java/JavaUtils.cpp:545–567  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543#endif
544
545QStringList getPrismJavaBundle()
546{
547 QList<QString> javas;
548
549 auto scanDir = [&](QString prefix) {
550 javas.append(FS::PathCombine(prefix, "jre", "bin", JavaUtils::javaExecutable));
551 javas.append(FS::PathCombine(prefix, "bin", JavaUtils::javaExecutable));
552 javas.append(FS::PathCombine(prefix, JavaUtils::javaExecutable));
553 };
554 auto scanJavaDir = [&](const QString& dirPath) {
555 QDir dir(dirPath);
556 if (!dir.exists())
557 return;
558 auto entries = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
559 for (auto& entry : entries) {
560 scanDir(entry.canonicalFilePath());
561 }
562 };
563
564 scanJavaDir(APPLICATION->javaPath());
565
566 return javas;
567}

Callers 2

FindJavaPathsMethod · 0.85
executeTaskMethod · 0.85

Calls 5

PathCombineFunction · 0.85
appendMethod · 0.80
existsMethod · 0.80
canonicalFilePathMethod · 0.80
javaPathMethod · 0.45

Tested by

no test coverage detected