MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / findJavaInstallation

Function findJavaInstallation

src/spawn.cpp:796–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

794}
795
796QString findJavaInstallation(const QString& jarFile)
797{
798 // try to find java automatically based on the given jar file
799 if (!jarFile.isEmpty()) {
800 const auto s = getExecutableForJarFile(jarFile);
801 if (!s.isEmpty()) {
802 return s;
803 }
804 }
805
806 // second attempt: look to the registry
807 const auto s = getJavaHome();
808 if (!s.isEmpty()) {
809 return s;
810 }
811
812 // not found
813 return {};
814}
815
816bool isBatchFile(const QFileInfo& target)
817{

Callers 2

setJarBinaryMethod · 0.85
getFileExecutionContextFunction · 0.85

Calls 3

getExecutableForJarFileFunction · 0.85
getJavaHomeFunction · 0.85
isEmptyMethod · 0.45

Tested by

no test coverage detected