diff --git a/src/lib/settings/ApplicationSettings.cpp b/src/lib/settings/ApplicationSettings.cpp
index 7f11f583..eeca711c 100644
--- a/src/lib/settings/ApplicationSettings.cpp
+++ b/src/lib/settings/ApplicationSettings.cpp
@@ -385,16 +385,6 @@ void ApplicationSettings::setHasPrefilledJavaPath(bool v)
setValue
Warning: You may experience a sudden slowdown during the course of indexing when setting this value " - "too low. This may also happen when using the JVM's default setting.
", - layout, row - ); - layout->setRowMinimumHeight(row - 1, 30); - } - else - { - m_jvmMaximumMemory = nullptr; - } - { // JRE System Library const QString title = "JRE System Library"; @@ -466,11 +448,6 @@ void QtProjectWizardContentPreferences::load() m_javaPath->setText(QString::fromStdWString(appSettings->getJavaPath().wstr())); } - if (m_jvmMaximumMemory) - { - m_jvmMaximumMemory->setText(QString::number(appSettings->getJavaMaximumMemory())); - } - m_jreSystemLibraryPaths->setPaths(appSettings->getJreSystemLibraryPaths()); if (m_mavenPath) @@ -535,15 +512,6 @@ void QtProjectWizardContentPreferences::save() appSettings->setJreSystemLibraryPaths(m_jreSystemLibraryPaths->getPathsAsAbsolute()); - if (m_jvmMaximumMemory) - { - const int jvmMaximumMemory = m_jvmMaximumMemory->text().toInt(); - if (jvmMaximumMemory) - { - appSettings->setJavaMaximumMemory(jvmMaximumMemory); - } - } - if (m_mavenPath) { appSettings->setMavenPath(FilePath(m_mavenPath->getText().toStdWString())); diff --git a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.h b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.h index d7ce1ae0..61b0a799 100644 --- a/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.h +++ b/src/lib_gui/qt/project_wizard/content/QtProjectWizardContentPreferences.h @@ -124,7 +124,6 @@ private: QComboBox* m_mavenPathDetectorBox; QtLocationPicker* m_javaPath; QtPathListBox* m_jreSystemLibraryPaths; - QLineEdit* m_jvmMaximumMemory; QtLocationPicker* m_mavenPath; QCheckBox* m_pythonPostProcessing; diff --git a/src/lib_java/data/parser/java/JavaEnvironmentFactory.cpp b/src/lib_java/data/parser/java/JavaEnvironmentFactory.cpp index 88101141..8e5a16ed 100644 --- a/src/lib_java/data/parser/java/JavaEnvironmentFactory.cpp +++ b/src/lib_java/data/parser/java/JavaEnvironmentFactory.cpp @@ -49,24 +49,7 @@ void JavaEnvironmentFactory::createInstance(std::string classPath, std::string& s_classPath = classPath; - int jvmMaximumMemory = ApplicationSettings::getInstance()->getJavaMaximumMemory(); - -#ifdef WIN32 - if (jvmMaximumMemory > 0) - { - const float underestimationFactor = 0.8f; - const int maximumMB = utility::getLargestByteSizeOfAllocatableMemory() / 1024 / 1024 * underestimationFactor; - if (jvmMaximumMemory > maximumMB) - { - LOG_WARNING("Selected amount of maximum JVM memory of " + std::to_string(jvmMaximumMemory) + " MB exceeds maximum allocatable " - "memory on system. Correcting selected value to " + std::to_string(maximumMB) + " MB."); - jvmMaximumMemory = maximumMB; - } - } -#endif // WIN32 - - const int optionCount = (jvmMaximumMemory < 0 ? 2 : 3); - const std::string maximumMemoryOprionString = "-Xmx" + std::to_string(jvmMaximumMemory) + "m"; + const int optionCount = 2; JavaVM* jvm = nullptr; // Pointer to the JVM (Java Virtual Machine) JNIEnv* env = nullptr; // Pointer to native interface @@ -84,10 +67,6 @@ void JavaEnvironmentFactory::createInstance(std::string classPath, std::string& //options[5].optionString = const_cast