Exec error exec 1 could not create the java virtual machine

Rad Studio 10.4 Не компилируется на андроид Delphi FireMonkey Решение и ответ на вопрос 2792277

1 / 1 / 1

Регистрация: 04.03.2021

Сообщений: 7

1

04.03.2021, 20:43. Показов 7490. Ответов 5


Доброго времени суток вчера скачал Rad Studio 10.4, при установке указал установить Android SDK/NDK. Создаю пустой проект(Create a new Multi-Device Application), помещаю метку hello world,подключаю смартфон с отладкой по USB, выбираю платформу, запускаю с отладкой, но вылетает ошибка:

Код

Cannot open file "D:EmbarcaderoProjectsEXEC". Не удается найти указанный файл.

Внизу в поле Messages:

[Exec Error] EXEC(1): Could not create the Java Virtual Machine.
[Exec Error] EXEC(1): A fatal exception has occurred. Program will exit.
[Exec Error] The command

Компиляция под Windows работает.
Изначально были проблемы с путями в Java, но их я поправил. Ошибки выши, уже после исправления путей.
Прикрепляю скриншоты с настройками SDK и переменными средами

__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь



0



3295 / 1977 / 635

Регистрация: 29.05.2013

Сообщений: 8,556

04.03.2021, 22:29

2

Цитата
Сообщение от DrunkTree
Посмотреть сообщение

Изначально были проблемы с путями в Java, но их я поправил

А вы собственно Java устанавливали? По идее, если устанавливали, то проблем с путями не должно быть.

Добавлено через 2 минуты
И у вас SDK Manager запускается? Если нет, то видимо проблемы с Java. Попробуйте просто отсюда скачать автономную версию.



0



5442 / 4266 / 1375

Регистрация: 14.04.2014

Сообщений: 19,204

Записей в блоге: 19

04.03.2021, 22:49

3

Цитата
Сообщение от DrunkTree
Посмотреть сообщение

….pDataLocalMicrosoftWindowsApps; ;C:UtilitsMicrosoft VS Codebin; & set JAVA_HOME=C:Program FilesJavajdk-15.0.2& «C:UsersPublicDocumentsEmbarcaderoStudio21.0 CatalogRe positoryAndroidSDK-2525-21.0.40680.4203build-tools29.0.3dx.bat» —dex —output=»D:EmbarcaderoProjectsAndroidDebugclas ses.dex» «d:embarcaderostudiolibandroidDebugandro id-support-v4.dex.jar» «d:embarcaderostudio…..

я что-то не понял этот лог
что там за ; ;
потом & set JAVA_HOME
что-то у меня нет таких простыней в messages
Причем вроде как это ваш PATH…

Вот прямо только что чтобы проверить, настроил на 10.4.1 SDK и NDK
указал пути, все встало отлично.

SDK/NDK ессно вместе с Делфи не качал, ставил отдельно, через Android Studio — SDK Manager
SDK 28, NDK 20.1.5948944

Добавлено через 1 минуту
ну и да
легко же проверить java
просто в произвольном каталоге в ком. строке набрать java и смотреть, видится она или нет



0



1 / 1 / 1

Регистрация: 04.03.2021

Сообщений: 7

04.03.2021, 23:34

 [ТС]

4

Java на месте, но нет таких программ как Android SDK Manager, я думал он с RADStudio поставится, его нет, и вообще нет многих программ, что идут с RAD.

ОБНОВЛЕНО! SDK Manager всё таки есть

Добавлено через 5 минут
Попробую всё снести, скачать Rad без SDK/NDK, их поставлю руками.



0



5442 / 4266 / 1375

Регистрация: 14.04.2014

Сообщений: 19,204

Записей в блоге: 19

05.03.2021, 08:21

5

я бы рекомендовал поставить Android Studio
и оттуда запускать SDK Manager
при этом от души рекомендую никогда не ставить ни Rad Studio ни SDK/NDK по дефолтным путям, замучаешься потом их в PATH читать)))



0



251 / 162 / 24

Регистрация: 22.08.2014

Сообщений: 1,598

Записей в блоге: 1

17.05.2021, 10:40

6

Бился на днях с подобной проблемкой. У меня Rad Studio 10.3 . В папке C:Program FilesJava были jdk1.8.0_60 , jre1.8.0_60 и jdk-16.0.1. Переименовал jdk-16.0.1 . Ошибка снялась.

Добавлено через 14 минут
Ну и расположение keytool и jarsigner для вкладки Java C:Program FilesJavajdk1.8.0_60binkeytool.exe , C:Program FilesJavajdk1.8.0_60binjarsigner.exe .



0



Доброго времени суток!

Уважаемые форумчане, помогите пожалуйста решить проблему с компиляцией приложения. Вчера все работало нормально сегодня не могу скомпилировать даже пустое приложение.

При компиляции вылетает ошибка:

Спойлер

Build
  Checking project dependencies…
  Compiling Project1.dproj (Debug, Android)
  [Exec Error] EXEC(1): A fatal exception has occurred. Program will exit.
  [Exec Error] The command «PATH C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:UsersPublicDocumentsEmbarcaderoInterBaseredistInterBase2020IDE_spoof;C:Program FilesCommon FilesOracleJavajavapath;C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:Program Files (x86)EmbarcaderoStudio21.0bin;C:UsersPublicDocumentsEmbarcaderoStudio21.0Bpl;C:Program Files (x86)EmbarcaderoStudio21.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio21.0BplWin64;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)Windows Kits10Windows Performance Toolkit;C:Program FilesJavajdk-16.0.1bin;C:UsersfredhackAppDataLocalMicrosoftWindowsApps; & «C:UsersfredhackAppDataLocalAndroidSdkbuild-tools30.0.3dx.bat» —dex —output=»C:UsersfredhackDocumentsEmbarcaderoStudioProjectsAndroidDebugclasses.dex» «c:program files (x86)embarcaderostudio21.0libandroidDebugandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-base.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-lite.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-base.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-basement.16.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-gass.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-identity.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-maps.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-base.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-stats.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tasks.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-wallet.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-analytics.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-common.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid-interop.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid.17.1.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-measurement-connector.17.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-messaging.17.5.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugfmx.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-licensing.dex.jar» » exited with code 1.
  Failed
  Elapsed time: 00:00:00.7
Output
  Build started 23.05.2021 10:31:00.
  __________________________________________________
  Project «C:UsersfredhackDocumentsEmbarcaderoStudioProjectsProject1.dproj» (Make target(s)):
  Target BuildClassesDex:
      PATH C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:UsersPublicDocumentsEmbarcaderoInterBaseredistInterBase2020IDE_spoof;C:Program FilesCommon FilesOracleJavajavapath;C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:Program Files (x86)EmbarcaderoStudio21.0bin;C:UsersPublicDocumentsEmbarcaderoStudio21.0Bpl;C:Program Files (x86)EmbarcaderoStudio21.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio21.0BplWin64;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)Windows Kits10Windows Performance Toolkit;C:Program FilesJavajdk-16.0.1bin;C:UsersfredhackAppDataLocalMicrosoftWindowsApps; & «C:UsersfredhackAppDataLocalAndroidSdkbuild-tools30.0.3dx.bat» —dex —output=»C:UsersfredhackDocumentsEmbarcaderoStudioProjectsAndroidDebugclasses.dex» «c:program files (x86)embarcaderostudio21.0libandroidDebugandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-base.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-lite.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-base.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-basement.16.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-gass.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-identity.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-maps.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-base.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-stats.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tasks.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-wallet.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-analytics.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-common.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid-interop.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid.17.1.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-measurement-connector.17.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-messaging.17.5.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugfmx.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-licensing.dex.jar» 
      -Djava.ext.dirs=C:UsersfredhackAppDataLocalAndroidSdkbuild-tools30.0.3lib is not supported.  Use -classpath instead.
      EXEC : error : Could not create the Java Virtual Machine.
      EXEC : error : A fatal exception has occurred. Program will exit.
      c:program files (x86)embarcaderostudio21.0binCodeGear.Common.Targets(988,5): error MSB3073: The command «PATH C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:UsersPublicDocumentsEmbarcaderoInterBaseredistInterBase2020IDE_spoof;C:Program FilesCommon FilesOracleJavajavapath;C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:Program Files (x86)EmbarcaderoStudio21.0bin;C:UsersPublicDocumentsEmbarcaderoStudio21.0Bpl;C:Program Files (x86)EmbarcaderoStudio21.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio21.0BplWin64;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)Windows Kits10Windows Performance Toolkit;C:Program FilesJavajdk-16.0.1bin;C:UsersfredhackAppDataLocalMicrosoftWindowsApps; & «C:UsersfredhackAppDataLocalAndroidSdkbuild-tools30.0.3dx.bat» —dex —output=»C:UsersfredhackDocumentsEmbarcaderoStudioProjectsAndroidDebugclasses.dex» «c:program files (x86)embarcaderostudio21.0libandroidDebugandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-base.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-lite.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-base.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-basement.16.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-gass.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-identity.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-maps.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-base.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-stats.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tasks.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-wallet.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-analytics.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-common.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid-interop.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid.17.1.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-measurement-connector.17.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-messaging.17.5.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugfmx.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-licensing.dex.jar» » exited with code 1.
  Done building target «BuildClassesDex» in project «Project1.dproj» — FAILED.
  Done building project «Project1.dproj» — FAILED.
  Build FAILED.
  EXEC : error : Could not create the Java Virtual Machine.
  EXEC : error : A fatal exception has occurred. Program will exit.
  c:program files (x86)embarcaderostudio21.0binCodeGear.Common.Targets(988,5): error MSB3073: The command «PATH C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:UsersPublicDocumentsEmbarcaderoInterBaseredistInterBase2020IDE_spoof;C:Program FilesCommon FilesOracleJavajavapath;C:Program FilesAdoptOpenJDKjdk-8.0.242.08-hotspotbin;C:Program Files (x86)EmbarcaderoStudio21.0bin;C:UsersPublicDocumentsEmbarcaderoStudio21.0Bpl;C:Program Files (x86)EmbarcaderoStudio21.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio21.0BplWin64;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:WindowsSystem32WindowsPowerShellv1.0;C:WindowsSystem32OpenSSH;C:Program Files (x86)Windows Kits10Windows Performance Toolkit;C:Program FilesJavajdk-16.0.1bin;C:UsersfredhackAppDataLocalMicrosoftWindowsApps; & «C:UsersfredhackAppDataLocalAndroidSdkbuild-tools30.0.3dx.bat» —dex —output=»C:UsersfredhackDocumentsEmbarcaderoStudioProjectsAndroidDebugclasses.dex» «c:program files (x86)embarcaderostudio21.0libandroidDebugandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-base.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-identifier.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads-lite.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-ads.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-analytics.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-base.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-basement.16.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-gass.17.2.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-identity.16.0.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-maps.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-base.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-measurement-sdk-api.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-stats.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tagmanager-v4-impl.16.0.8.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-tasks.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-android-gms.play-services-wallet.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-analytics.16.4.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-common.16.1.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid-interop.16.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-iid.17.1.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-measurement-connector.17.0.1.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugcom-google-firebase.firebase-messaging.17.5.0.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebugfmx.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio21.0libandroidDebuggoogle-play-licensing.dex.jar» » exited with code 1.
      0 Warning(s)
      3 Error(s)
  Time Elapsed 00:00:00.57

Screenshot_6.png.5e23bfe10e637bc35e0a7b0acd1acfbd.png

Я так понимаю какая то проблема с jdk?

Помогите пожалуйста заранее большое спасибо!

Компиляции добился удалением JDK из (программы и компоненты панель управления) устанавливал его отдельно от delphi

Теперь приложение компилируется но после компиляции вылетает ошибка

Screenshot_10.thumb.png.7cbd912d26374ddbc81bd9be1a4cb01c.png

Приложение на телефоне запускается работает но я так понимаю не работает отладка? в чем причина может быть?


Изменено 23 мая, 2021 пользователем fredhack

Дополнение

Recommended Posts

Hi all,
So I recently upgraded my Android SDK Version to 25.2.5 from 24.3.3 (the stock version in Tokyo).
I also updated my JDK version from JDK 1.8U60 ( the Tokyo stock version) to 9.0.1 because I needed to use IntellijIDEA and my problem started.
My Android FMX projects refuses to compile, I have even tried a blank form yet I get the error below

Quote

[Exec Error] The command «PATH C:Program FilesJavajdk-9.0.1bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:WINDOWSsystem32configsystemprofile.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;C:UsersXor-elAppDataLocalProgramsPythonPython36Scripts;C:UsersXor-elAppDataLocalProgramsPythonPython36;C:UsersXor-elAppDataLocalGitHubDesktopbin;C:Program FilesMicrosoft VS Codebin;C:UsersXor-elAppDataLocalMicrosoftWindowsApps;C:xamppphp;C:UsersXor-elAppDataRoamingComposervendorbin;C:xamppmysqlbin;C:UsersXor-elAppDataRoamingnpm;C:Program FilesHerokubin;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersXor-elAppDataLocalProgramsMicrosoft VS Codebin; & «C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat» —dex —output=»C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXAndroidAndroidDebugclasses.dex» «c:program files (x86)embarcaderostudio19.0libAndroidDebugandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebugcloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebugfmx.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-analytics-v2.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-licensing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-ads-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-analytics-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-base-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-gcm-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-identity-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-maps-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-panorama-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-plus-7.0.0.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidDebuggoogle-play-services-wallet-7.0.0.dex.jar» » exited with code 1.

The annoying thing is that my Window Path contains the path to the JDK
System Environment Variable

Quote

C:Program FilesJavajdk-9.0.1bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;%SystemRoot%system32;%SystemRoot%;%SystemRoot%System32Wbem;%SYSTEMROOT%System32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;%USERPROFILE%.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;%SYSTEMROOT%System32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;

Any help is appreciated, I have been stuck on this for over 12 hours now and have tried everything I could see on the internet (stackoverflow) yet no progress.

Screenshots of MY SDK Settings are attached below

1.jpg

2.jpg

3.jpg


Edited November 28, 2018 by Ugochukwu Mmaduekwe

Share this post


Link to post

Change the JDK paths back to 1.8 in Delphi Android SDK settings under Java tab. (Last screenshot)

Share this post


Link to post

11 minutes ago, Dalija Prasnikar said:

Change the JDK paths back to 1.8 in Delphi Android SDK settings under Java tab. (Last screenshot)

Thanks for replying, Just did that, same error as above.
 

4.jpg

Share this post


Link to post

Sorry. There was some other thing but I don’t remember exactly.

One thing that also does sound strange in your config is that you have selected platform-28 and it says Android SDK 25..x.x

Share this post


Link to post

53 minutes ago, Dalija Prasnikar said:

Sorry. There was some other thing but I don’t remember exactly.

One thing that also does sound strange in your config is that you have selected platform-28 and it says Android SDK 25..x.x

no problems.

about the config, it worked fine that way before the upgrade.

Share this post


Link to post

8 hours ago, Dalija Prasnikar said:

One thing that also does sound strange in your config is that you have selected platform-28 and it says Android SDK 25..x.x

That’s not strange; you can have a base SDK that started from 25.x.x and add later platforms and build tools using the Android SDK Manager, which is exactly what I’ve done on my systems.

12 hours ago, Ugochukwu Mmaduekwe said:

The annoying thing is that my Window Path contains the path to the JDK

If you analyze the message, you will see that it can be a problem with the command that follows the ampersand (&), i.e. the one that starts with:

«C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat»

If you check the Output tab of the messages window, it has more detail about the error. It’s likely to be that dex is failing, and is likely to be because of a JDK mismatch. I see you have in your path:

  C:Program FilesJavajdk-9.0.1bin

You will probably need to change that to the corresponding path for your JDK version 7 (mine is C:Program FilesJavajdk1.7.0_80)

Share this post


Link to post

55 minutes ago, Dave Nottage said:

That’s not strange; you can have a base SDK that started from 25.x.x and add later platforms and build tools using the Android SDK Manager, which is exactly what I’ve done on my systems.

If you analyze the message, you will see that it can be a problem with the command that follows the ampersand (&), i.e. the one that starts with:

«C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat«

If you check the Output tab of the messages window, it has more detail about the error. It’s likely to be that dex is failing, and is likely to be because of a JDK mismatch. I see you have in your path:

  C:Program FilesJavajdk-9.0.1bin

You will probably need to change that to the corresponding path for your JDK version 7 (mine is C:Program FilesJavajdk1.7.0_80)

Thanks for replying.
Have done as you said, unfortunately, no progress.
 

below is my output tab log.
it’s saying something about could not create the java virtual machine, have restarted my PC countless times to no avail, uninstalled and reinstalled the JDK multiple times too.
if I run java -version in cmd, I get

java version «9.0.1»
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

The annoying thing is that everything was working fine about 2 days ago.

Quote

Build started 11/29/2018 1:21:33 AM.
__________________________________________________
Project «C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXProject1.dproj» (Build target(s)):
Target BuildClassesDex:
    PATH C:Program FilesJavajdk-9.0.1bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:WINDOWSsystem32configsystemprofile.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;C:UsersXor-elAppDataLocalProgramsPythonPython36Scripts;C:UsersXor-elAppDataLocalProgramsPythonPython36;C:UsersXor-elAppDataLocalGitHubDesktopbin;C:Program FilesMicrosoft VS Codebin;C:UsersXor-elAppDataLocalMicrosoftWindowsApps;C:xamppphp;C:UsersXor-elAppDataRoamingComposervendorbin;C:xamppmysqlbin;C:UsersXor-elAppDataRoamingnpm;C:Program FilesHerokubin;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersXor-elAppDataLocalProgramsMicrosoft VS Codebin; & «C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat» —dex —output=»C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXAndroidReleaseclasses.dex» «c:program files (x86)embarcaderostudio19.0libAndroidReleaseandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasecloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasefmx.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-analytics-v2.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-licensing.dex.jar»
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    -Djava.ext.dirs=C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3lib is not supported.  Use -classpath instead.
    c:program files (x86)embarcaderostudio19.0binCodeGear.Common.Targets(894,5): error MSB3073: The command «PATH C:Program FilesJavajdk-9.0.1bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:WINDOWSsystem32configsystemprofile.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;C:UsersXor-elAppDataLocalProgramsPythonPython36Scripts;C:UsersXor-elAppDataLocalProgramsPythonPython36;C:UsersXor-elAppDataLocalGitHubDesktopbin;C:Program FilesMicrosoft VS Codebin;C:UsersXor-elAppDataLocalMicrosoftWindowsApps;C:xamppphp;C:UsersXor-elAppDataRoamingComposervendorbin;C:xamppmysqlbin;C:UsersXor-elAppDataRoamingnpm;C:Program FilesHerokubin;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersXor-elAppDataLocalProgramsMicrosoft VS Codebin; & «C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat» —dex —output=»C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXAndroidReleaseclasses.dex» «c:program files (x86)embarcaderostudio19.0libAndroidReleaseandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasecloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasefmx.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-analytics-v2.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-licensing.dex.jar» » exited with code 1.
Done building target «BuildClassesDex» in project «Project1.dproj» — FAILED.
Done building project «Project1.dproj» — FAILED.
Build FAILED.
c:program files (x86)embarcaderostudio19.0binCodeGear.Common.Targets(894,5): error MSB3073: The command «PATH C:Program FilesJavajdk-9.0.1bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:WINDOWSsystem32configsystemprofile.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;C:UsersXor-elAppDataLocalProgramsPythonPython36Scripts;C:UsersXor-elAppDataLocalProgramsPythonPython36;C:UsersXor-elAppDataLocalGitHubDesktopbin;C:Program FilesMicrosoft VS Codebin;C:UsersXor-elAppDataLocalMicrosoftWindowsApps;C:xamppphp;C:UsersXor-elAppDataRoamingComposervendorbin;C:xamppmysqlbin;C:UsersXor-elAppDataRoamingnpm;C:Program FilesHerokubin;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersXor-elAppDataLocalProgramsMicrosoft VS Codebin; & «C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat» —dex —output=»C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXAndroidReleaseclasses.dex» «c:program files (x86)embarcaderostudio19.0libAndroidReleaseandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasecloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasefmx.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-analytics-v2.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-licensing.dex.jar» » exited with code 1.
    0 Warning(s)
    1 Error(s)
Time Elapsed 00:00:01.31

Share this post


Link to post

Your PATH is still pointing to C:Program FilesJavajdk-9.0.1bin. (it’s in the first few lines of the output you provided)  This tool makes it easy to change it:

https://www.rapidee.com

Share this post


Link to post

9 minutes ago, Dave Nottage said:

Your PATH is still pointing to C:Program FilesJavajdk-9.0.1bin. (it’s in the first few lines of the output you provided)  This tool makes it easy to change it:

https://www.rapidee.com

Do you mean Delphi Tokyo 10.2.3 can’t use JDK 9?

My Tokyo came with jdk1.8.0_60, should I change my path to this (jdk1.8.0_60)?


Edited November 29, 2018 by Ugochukwu Mmaduekwe

Share this post


Link to post

16 minutes ago, Dave Nottage said:

Your PATH is still pointing to C:Program FilesJavajdk-9.0.1bin. (it’s in the first few lines of the output you provided)  This tool makes it easy to change it:

https://www.rapidee.com

Ok, so I just changed the JDK path from C:Program FilesJavajdk-9.0.1bin to C:Program FilesJavajdk1.8.0_60bin (stock Tokyo version) using the tool you specified (thanks).
Now here is my output tab log, pretty much the same error.

Quote

Build started 11/29/2018 2:03:36 AM.
__________________________________________________
Project «C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXProject1.dproj» (Build target(s)):
Target BuildClassesDex:
    PATH C:Program FilesJavajdk1.8.0_60bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:WINDOWSsystem32configsystemprofile.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;C:UsersXor-elAppDataLocalProgramsPythonPython36Scripts;C:UsersXor-elAppDataLocalProgramsPythonPython36;C:UsersXor-elAppDataLocalGitHubDesktopbin;C:Program FilesMicrosoft VS Codebin;C:UsersXor-elAppDataLocalMicrosoftWindowsApps;C:xamppphp;C:UsersXor-elAppDataRoamingComposervendorbin;C:xamppmysqlbin;C:UsersXor-elAppDataRoamingnpm;C:Program FilesHerokubin;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersXor-elAppDataLocalProgramsMicrosoft VS Codebin; & «C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat» —dex —output=»C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXAndroidReleaseclasses.dex» «c:program files (x86)embarcaderostudio19.0libAndroidReleaseandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasecloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasefmx.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-analytics-v2.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-licensing.dex.jar»
    -Djava.ext.dirs=C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3lib is not supported.  Use -classpath instead.
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.
    c:program files (x86)embarcaderostudio19.0binCodeGear.Common.Targets(894,5): error MSB3073: The command «PATH C:Program FilesJavajdk1.8.0_60bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:WINDOWSsystem32configsystemprofile.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;C:UsersXor-elAppDataLocalProgramsPythonPython36Scripts;C:UsersXor-elAppDataLocalProgramsPythonPython36;C:UsersXor-elAppDataLocalGitHubDesktopbin;C:Program FilesMicrosoft VS Codebin;C:UsersXor-elAppDataLocalMicrosoftWindowsApps;C:xamppphp;C:UsersXor-elAppDataRoamingComposervendorbin;C:xamppmysqlbin;C:UsersXor-elAppDataRoamingnpm;C:Program FilesHerokubin;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersXor-elAppDataLocalProgramsMicrosoft VS Codebin; & «C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat» —dex —output=»C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXAndroidReleaseclasses.dex» «c:program files (x86)embarcaderostudio19.0libAndroidReleaseandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasecloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasefmx.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-analytics-v2.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-licensing.dex.jar» » exited with code 1.
Done building target «BuildClassesDex» in project «Project1.dproj» — FAILED.
Done building project «Project1.dproj» — FAILED.
Build FAILED.
c:program files (x86)embarcaderostudio19.0binCodeGear.Common.Targets(894,5): error MSB3073: The command «PATH C:Program FilesJavajdk1.8.0_60bin;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersXor-elDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersXor-elDocumentsEmbarcaderoStudio19.0BplWin64;C:Program Files (x86)EmbarcaderoStudio19.0bin;C:UsersPublicDocumentsEmbarcaderoStudio19.0Bpl;C:Program Files (x86)EmbarcaderoStudio19.0bin64;C:UsersPublicDocumentsEmbarcaderoStudio19.0BplWin64;C:ProgramDataOracleJavajavapath;C:Program Files (x86)InteliCLS Client;C:Program FilesInteliCLS Client;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:WINDOWSSystem32WindowsPowerShellv1.0;C:Program Files (x86)Calibre2;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsDAL;C:Program FilesIntelIntel(R) Management Engine ComponentsDAL;C:Program Files (x86)IntelIntel(R) Management Engine ComponentsIPT;C:Program FilesIntelIntel(R) Management Engine ComponentsIPT;C:WINDOWSsystem32configsystemprofile.dnxbin;C:Program FilesMicrosoft DNXDnvm;C:Program FilesMicrosoft SQL Server130ToolsBinn;C:ProgramDataComposerSetupbin;C:Program FilesCalibre2;C:Program Filesnodejs;C:WINDOWSSystem32OpenSSH;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:Program Filesdotnet;C:Program FilesGitcmd;C:Program FilesPuTTY;C:UsersXor-elAppDataLocalProgramsPythonPython36Scripts;C:UsersXor-elAppDataLocalProgramsPythonPython36;C:UsersXor-elAppDataLocalGitHubDesktopbin;C:Program FilesMicrosoft VS Codebin;C:UsersXor-elAppDataLocalMicrosoftWindowsApps;C:xamppphp;C:UsersXor-elAppDataRoamingComposervendorbin;C:xamppmysqlbin;C:UsersXor-elAppDataRoamingnpm;C:Program FilesHerokubin;C:Program FilesIntelWiFibin;C:Program FilesCommon FilesIntelWirelessCommon;C:UsersXor-elAppDataLocalProgramsMicrosoft VS Codebin; & «C:UsersXor-elDocumentsEmbarcaderoStudio19.0PlatformSDKsandroid-sdk-windowsbuild-tools28.0.3dx.bat» —dex —output=»C:UsersXor-elDocumentsEmbarcaderoStudioProjectsFMXAndroidReleaseclasses.dex» «c:program files (x86)embarcaderostudio19.0libAndroidReleaseandroid-support-v4.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasecloud-messaging.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasefmx.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-analytics-v2.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-billing.dex.jar» «c:program files (x86)embarcaderostudio19.0libAndroidReleasegoogle-play-licensing.dex.jar» » exited with code 1.
    0 Warning(s)
    1 Error(s)
Time Elapsed 00:00:01.59

Share this post


Link to post

Earlier I said: «You will probably need to change that to the corresponding path for your JDK version 7 (mine is C:Program FilesJavajdk1.7.0_80)»

Share this post


Link to post

54 minutes ago, Dave Nottage said:

Earlier I said: «You will probably need to change that to the corresponding path for your JDK version 7 (mine is C:Program FilesJavajdk1.7.0_80)»

Ok, I just installed JDK 7 ( jdk1.7.0_80 ) and changed the corresponding path as you stated, restarted my PC, same issues,
Am gradually losing my mind here.

Share this post


Link to post

For me Tokyo works fine with JDK 1.8_60, but I don’t have Java 9 installed, so I don’t know whether this could be the problem or not.

Share this post


Link to post

Thanks all, I finally got it to work. Unfortunately I had to uninstall every other Java version leaving only JDK 1.8_60.
It seems Tokyo only works with JDK 1.8_60.

Thanks once again.

Share this post


Link to post

Could you please report your issue with Java 9 to Quality Portal. Having different Java versions should not be an issue.

Share this post


Link to post

Share this post


Link to post

On 11/29/2018 at 10:15 PM, Dalija Prasnikar said:

Could you please report your issue with Java 9 to Quality Portal. Having different Java versions should not be an issue.

It will be an issue if the Android tools don’t support it, and nothing EMBT can do anything about.

Share this post


Link to post

11 hours ago, Dave Nottage said:

It will be an issue if the Android tools don’t support it, and nothing EMBT can do anything about.

AFAIK, everything in Android is directly configurable. Android tools don’t need to support Java 9, but they should work if Java 9 is installed along side with Java 8


Edited December 1, 2018 by Dalija Prasnikar

Share this post


Link to post

I guess the above problem came from me.

https://github.com/DelphiWorlds/KastriFree/issues/36

for me i never changed the java JDK 1.8_60.

All Android fmx compile with no problem.

Compiling without dw-webchromeclient.jar compile with no problem.

So in my opinion ,and i mite be wrong, dw-webchromeclient.jar  is the problem.


Edited December 1, 2019 by limelect

Share this post


Link to post

11 hours ago, limelect said:

So in my opinion ,and i mite be wrong, dw-webchromeclient.jar  is the problem.

It’s not the problem, since it compiles fine for me, and others — see this link:

i.e. Yaron has been able to compile using the .jar

On my machine, I have Android SDK 25.2.5, and the following settings reflected in the Delphi SDK manager:

Build tools: 28.0.3 (this path is used for things like ZipAlign.exe and Aapt.exe)

Platform: android-28

JDK: 1.8.0_191   (C:Program FilesJavajdk1.8.0_191bin is the *only* entry pointing to a JDK in the PATH environment variable)

I’m pretty sure those are the ones that matter.

Share this post


Link to post

Share this post


Link to post

It has no dependency on any Delphi version, if that’s what you meant. I just tried compiling it in Delphi 10.1 Berlin with the correct SDK settings (as per my last message) and there were no errors.


Edited December 2, 2019 by Dave Nottage

Share this post


Link to post

@Dave NottageBy version i mean what ever is needed to change in my Delphi to some thing else.

My Delphi works and is stable i am NOT going to change any thing to go into problems.

This java should work on my system as on another.

Like if i take normal pascal file ,no api or else inside, from ver 5-7 and compile it

with 10+ it will compile with no problems.

How about placing the java SOURCE here.

I did dicompile DWWebChromeClient.class but it is better to have it work on ALL systems.


Edited December 3, 2019 by limelect

Share this post


Link to post


  • Like


    1

Share this post


Link to post

one solution i have found is to disable all the unnecessary android library files in the project configuration/libraries (right hand pane)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here.

Sign In Now

Some users are encountering the Could Not Create The Java Virtual Machine error when trying to launch an application that is using Java. This particular issue is reported to occur with Minecraft and several other applications that are built around Java.

Could not create the Java Virtual Machine. Error: A fatal exception has occured. Program will exit.

Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. The program will exit.

What is causing the Could Not Create The Java Virtual Machine error?

We investigated this particular issue by looking at various user reports and the troubleshooting strategies that they used to resolve the same error message. Based on their conclusions, there are a couple of scenarios that will trigger this particular issue:

  • Java is invoked by the wrong arguments or options – This can occur if you’re running a home-brewed application or you’re trying to open an open-source application that is known to cause system instability.
  • Java global maximum heap memory is not high enough – One of the most common causes of why you can encounter this particular error is if you try to start a Java application with a maximum heap memory size larger than the one set as the System Variable.
  • Java executable and/or application require administrative privileges – This might happen with applications that need admin access in order to function properly.

If you’re currently looking for a way to resolve the, Could Not Create The Java Virtual Machine error, this article will provide you with several verified troubleshooting strategies. Below you have a collection of methods that other users in a similar situation have used to get the issue resolved.

To ensure the best results, follow the methods below in the order that they are presented until you discover a method that is effective in resolving the error for your particular scenario.

Method 1: Adding the _JAVA_OPTIONS to System Variables

Most affected users have managed to get the issue resolved by creating a System Variable for Java called _JAVA_OPTIONS and setting it’s value to Xmx512M. What this essentially does is it sets the global maximum heap memory size for Java.

This will resolve any error message that occurs because the started Java application’s maximum heap memory size is larger than the one set as the System Variable. Several users encountering the same issue have reported that the issue was resolved entirely after they performed the steps below.

Here’s what you need to do to add a _JAVA_OPTIONS entry in System Variables to enlarge the global maximum heap memory size:

  1. Press Windows key + R to open up a Run dialog box. Then, type “sysdm.cpl” and press Enter to open up the System Properties screen.
  2. Inside the System Properties screen, go to the Advanced tab and click on Environment Variables.
  3. In the Environment Variables window, click on New (under System Variables).
  4. Inside the New System Variable window, set the Variable name to _JAVA_OPTIONS and the Variable value to –Xmx512M and click Ok to save the changes.
  5. Close the previously opened windows and restart your machine to enforce the changes.
  6. At the next startup, open the application that was previously showing you the Could Not Create the Java Virtual Machine error and see if is now functioning properly.

Creating a System Variable called _JAVA_OPTIONS and assigning it the value Xmx512M

Creating a System Variable called _JAVA_OPTIONS and assigning it the value Xmx512M

If you’re still seeing the same error message at the start of the application, try adding the Java Bin path which might be similar to “%USER PATHJavajdk1.6.0_39bin” to the environment variable as indicated in the above method and see if that works.

Method 2: Opening java.exe with admin rights 

Several users struggling to resolve the same issue have managed to get the issue resolved after forcing the main Java executable (java.exe) to open with administrative privileges.

Some users reported that they were able to resolve the issue after applying this fix on both the main java executable and the executable of the application that is showing the error message.

Here’s a quick guide through the whole thing:

  1. Open File Explorer and navigate to the location of your java installation. We’ll need to arrive at the location of the main Java executable (java.exe). By default, you should find it in Program Files/Java/*JRE build version*/bin. The exact location will differ depending on which Java Runtime Environment you’re using.Navigate to the location of java.exe
    Navigate to the location of java.exe

    Note: If you installed Java in a custom location, navigate the custom location instead.

  2. Right-click on java.exe and choose Properties. Then, go to the Compatibility tab and check the box associated with Run this program as an administrator (under Settings). Click Apply to save the changes.go to Compatibility tab and enable Run this program as an administrator
    go to the Compatibility tab and enable Run this program as an administrator
  3. Right-click on the application executable (the one that is triggering the error) and repeat the same procedure: Compatibility > Run this program as an administrator > Apply.
  4. Run the application and see if the error message is resolved.

Method 3: Reinstalling Java

In some cases, the error is triggered because Java might not be installed properly or its installation might have been corrupted over time. Therefore, in this step, we will be reinstalling Java after uninstalling it completely. For that:

  1. Press Windows key + R to open up the Run prompt and type in “Appwiz.cpl”.
    Type “appwiz.cpl” into the Run dialog and press Enter
  2. Press “Enter” and the Programs and Features screen will open up.
  3. At the Programs and Features screen, scroll through the installed application list until you find Java.
    Checking the Programs and features screen
  4. Right-click on it and select “Uninstall” to remove it completely from the system
  5. First, delete the primary Java installation and later you should also remove all other Java installations such as updates and other versions.
  6. After uninstalling all installation, restart your computer.
  7. After booting up, visit this link and download the latest version of JRE.
  8. Check to see if the issue persists.
  9. If the error still persists, download and install the latest version of JDK from here.
    Note: If you are already using JDK, try changing its versions or uninstalling the JRE that has been installed along with it.
  10. Verify if the issue still exists.

Method 4: Fixing Errors With Code

There are different reasons behind this error and some of them include if you have some particular errors with your code. We will highlight some below.

  • Remove Hyphen: Some users noted that the error was fixed by changing the double hyphen “–” to a single one “-” in their code. For example:
    Change the code
    “sony@sony-VPCEH25EN:~$ java –version
    Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
    Unrecognized option: –version
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.”
    To
    “sony@sony-VPCEH25EN:~$ java -version
    Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
    Unrecognized option: –version
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.”
  • Also, Try removing the following line from your argument
    -Djava.endorsed.dirs=”C:Program FilesApache Software FoundationTomcat 8.5endorsed”
  • Open your eclipse.ini file and make sure that you add the “-vm” entry above the vm args otherwise, JVM V6 will be selected in env vars.
  • If on Ubuntu, you should know that Java 8 is the only version that is supported. Therefore, using the third method. Uninstall Java, and install the previous version.

Method 5: Editing Eclipse.ini File

We can also tweak things inside the Eclipes.ini File to get rid of this issue. There might be a couple of issues with its configuration that need to be addressed therefore, we have divided it into separate issues. Follow the one which suits your scenario the best.

Lowering Memory Use

  1. Open the Eclipse.ini file inside the Eclipse folder with notepad.
  2. Find the line similar to “-Xmx256m” (It might be -Xmx1024m or -Xmx 512m).
  3. Now change the default value to a more reasonable figure depending upon the RAM installed on your computer and add the version number to it as well. For Example:
    -Xmx512m
    -Dosgi.requiredJavaVersion=1.6
    OR
    -Xmx512m
    -Dosgi.requiredJavaVersion=1.7
    OR
    -Xmx512m
    -Dosgi.requiredJavaVersion=1.8
  4. Also, try removing the “256m” value from the “-launcher.XXMaxPermSize” line.
  5. Check to see if the issue persists.

Tinkering Around

  1. Try to remove the following lines from your file.
    -vm P:Programsjdk1.6bin
  2. Also, change the following lines.
    set -Dosgi.requiredJavaVersion=1.5
    TO
    set -Dosgi.requiredJavaVersion=1.6
  3. Also, try adding the following line above “-vmargs!” line.
    -vm C:Program Files (x86)Javajre6binjavaw.exe
  4. Also, point to JVM.dll using the following line.
    -vm
    C:Program FilesJavajre7binclientjvm.dll
  5. Open the Eclipse file and replace “-vmargs” with the path of javaw.exe. For Example:
    -startup
    plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
    -product
    com.android.ide.eclipse.adt.package.product
    --launcher.XXMaxPermSize
    256M
    -showsplash
    com.android.ide.eclipse.adt.package.product
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    **-vm “c:Program FilesJavajdk1.7.0_07binjavaw.exe”** 
    -Dosgi.requiredJavaVersion=1.6
    -Xms40m
    -Xmx768m
    -Declipse.buildId=v21.1.0-569685
  6. Also, you can place the following line at the end and check if that works.
    -vmargs
    -Xms40m
    -Xmx512m
    -XX:MaxPermSize=256m
  7. Furthermore, try removing the following lines from the eclipse.ini and check if that works.
    -XX:+UseStringDeduplication
    -XX:+UseG1GC
  8. You can also try removing the eclipse.ini file if the issue still persists as that has reportedly fixed the issue for some but remember to back it up first just in case you need it. Also, try closing all the power-hungry applications before starting Java to make sure proper resources are available.

Checking for JDK Corruption

  1. Press “Windows” + “R” to open the Run prompt and type in “cmd”.
  2. Type in the following command and check if that gives an error.
    c:> java -version
  3. If it does give an error, reinstall the JDK completely.

Photo of Kevin Arrows

Kevin Arrows

Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Don’t hesitate to take a closer look at our quick solutions

by Matthew Adams

Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things… read more


Updated on January 27, 2023

Reviewed by
Alex Serban

Alex Serban

After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more

  • You should run the software as an administrator as the lack of rights can trigger the error.
  • If you’re still experiencing this problem, it all comes down to reinstalling Java from scratch.

Fix Could not create the Java virtual machine

XINSTALL BY CLICKING THE DOWNLOAD FILE

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer’s security and performance
  • Restoro has been downloaded by 0 readers this month.

The Java virtual machine fatal exception error pops up for some users when they try to launch software built on Java. Minecraft users are no strangers to this issue.

The full error message states: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Consequently, the Java program doesn’t run, yet we will share some simple fixes.

Why am I getting Could not create Java Virtual Machine?

The following are some of the possible causes that you should pay attention to:

  • Memory size issues – The Java Virtual Machine error often arises when Java needs a larger global maximum heap memory size. The problem was resolved by users increasing the maximum RAM allotted to Java.
  • Incorrect path settings – In this case, you need to set or modify the path as described below.
  • Corrupted files – Such files may contribute to this error, so note that reinstallation of Java should fix this. This applies the Windows error 2 while loading the Java VM error message as well.

Do I need to install JVM?

Any machine on which you want to run Java code must have the Java Runtime Environment (JRE) installed. This is because Java does not run natively on a computer as C++ or C does; instead, someone must translate Java’s instructions into machine code, which the JVM does.

This error may come in different shades, including Could not create the Java Virtual Machine in Android Studio, Docker, Pentaho, Elasticsearch, Sonarqube, Minecraft, Eclipse, React Native, and IntelliJ, yet rest assured that you’ll find our solutions useful.

How do I fix Could not create the Java Virtual Machine error?

In this article

  • Why am I getting Could not create Java Virtual Machine?
  • Do I need to install JVM?
  • How do I fix Could not create the Java Virtual Machine error?
  • 1. Remove JDK (Java Development Kit)
  • 2. Set up a new system variable for Java
  • 3. Select the Run as administrator option for Java
  • 4. Reinstall Java

1. Remove JDK (Java Development Kit)

  1. Press Windows + I to open Settings, head to Apps from the navigation pane, and click on Installed apps.installed apps
  2. Locate the Java Development Kit, click on the ellipsis next to it, and choose Uninstall.uninstall JDK
  3. Follow the on-screen instructions to complete the process.

That’s it! Our readers pointed out that it was the development kit that conflicted with the process and led to the Could not create the Java Virtual Machine error, and uninstalling the program did the trick.

2. Set up a new system variable for Java

  1. Open Run with the Windows key + R keyboard shortcut, then enter sysdm.cpl in Run and click OK.
    could not create the java virtual machine
  2. Select the Advanced tab on that window, and click the Environment Variables button.
  3. Click the New button under the System variables box.
  4. Enter _JAVA_OPTIONS in the Variable name text box.
  5. Then, enter –Xmx512M in the Variable value text box, which increases RAM allocation to 512 megabytes.
  6. Click the OK button to close the window, then press the OK button on the Environmental window.

Importantly, note that instead of using a double hyphen in the Variable value as stated above, you can use a single hyphen (-Xmx512M) as this is often more effective, and would not spark up other complications.

Read more about this topic

  • How to fix Windows error 2 while loading the Java VM
  • Fit the Runtime error Java in just a few easy steps
  • How to download Java 10 on your Windows PC

3. Select the Run as administrator option for Java

The Java Virtual Machine error can also be due to insufficient admin rights. Thus, some users might need to assign admin rights to Java. You can try the steps below to apply this solution. 

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

1. Press the Windows key + S keyboard shortcut, and enter Java. Right-click on Java and select Open file location to open Java’s folder in File Explorer.

2. Right-click java.exe and select Properties.

3. Head to the Compatibility tab and select the Run this program as an administrator option.

java-virtual-machine-fatal-error

5. Select the Apply option, and click OK to close the window.

java-virtual-machine-fatal-error

4. Reinstall Java

  1. First, open the Run accessory by pressing the Windows key + R.
  2. Type the command below and hit Enter.
    appwiz.cpl
  3. Select Java from the program list and click Uninstall.
    java-virtual-machine-fatal-error
  4. Click Yes on any confirmation window that opens.
  5. Restart Windows, open the Java download page in a browser, and download either the 32 or 64-bit offline Windows versions.
    java-virtual-machine-fatal-error
  6. Users need 32-bit Java for 32-bit programs and 64-bit Java for 64-bit software. If in doubt, your best bet is to download and install both Java versions.
  7. Thereafter, open the Java setup wizard, and click the Install button.

That’s how users can fix this fatal error and get back to running the required Java software.

Any of the previously mentioned solutions may be successfully applied when getting a Java virtual machine launcher error which arises even if nothing has changed on your computer, and it’s most likely related to Java installation.

Things are no different when it comes to the Could not create the Java virtual machine a fatal exception has occurred error. This problem also seems to appear randomly. Make sure you aren’t using a 32-bit VM and a 64-bit Eclipse.

Minecraft could not create the Java virtual machine is an error that shows up when trying to launch Minecraft. The main reason is that it needs admin access in order to function properly. Also, read our detailed guide on how to install Java on Windows 11.

If you have any other questions or advice for other users to try, don’t hesitate to leave a comment below.

newsletter icon

Newsletter

September 7th at 12:00am


I’ve been playing around with Visual Studio’s cross-platform capabilities over the last couple days and decided to try a ‘raw’ Cordova project to see if it fits my needs better than the other options I’ve explored (Xamarin, ionic). Visual studio abstracts most of the complexity away which is nice most of the time, but what if you run into a problem?

In my case I ran into a few cryptic error messages when I tried to build and run my Cordova app on a real Android device from within Visual Studio:

MSB3073 The command «platformsandroidcordovaclean.bat» exited with code 1.

Could not create the Java Virtual Machine.

A fatal exception has occurred. Program will exit.

(As it turns out, these messages aren’t super helpful. The resolution lies in further troubleshooting)

This is the troubleshooting information I had to go on:

VS2015_cordova_exception.png

The Output tab had some additional information:

1> ANDROID_HOME=C:Program Files (x86)Androidandroid-sdk
1> JAVA_HOME=C:Program Files (x86)Javajdk1.7.0_71
1> Running: c:UsersrionDocumentsVisual Studio 2015Projectsprojprojplatformsandroidgradlew clean -b c:UsersrionDocumentsVisual Studio 2015Projectsprojprojplatformsandroidbuild.gradle -Dorg.gradle.daemon=true

1>
1> FAILURE: Build failed with an exception.
1>
1> * What went wrong:
1> Unable to start the daemon process.
1> This problem might be caused by incorrect configuration of the daemon.
1> For example, an unrecognized jvm option is used.
1> Please refer to the user guide chapter on the daemon at http://gradle.org/docs/2.2.1/userguide/gradle_daemon.html
1> Please read the following process output to find out more:
1> ————————
1> Error occurred during initialization of VM
1> Could not reserve enough space for object heap
1>EXEC : error : Could not create the Java Virtual Machine.
1>EXEC : error : A fatal exception has occurred. Program will exit.
1>
1>
1> * Try:
1> Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output.

Troubleshooting

I pulled up a VS command prompt (Start -> Visual Studio 2015 -> Visual Studio Tools -> Developer Command Prompt) and tried to run the command specified and found this:

VS2015_cordova_moreinfo.png

The key text being:

* What went wrong:
A problem occurred evaluating root project ‘android’.
> No installed build tools found. Please install the Android build tools version 19.1.0 or higher.

(This didn’t make a lot of sense given that the ANDROID_HOME variable is set in the script above)

Solution

The solution for me was to add an ANDROID_HOME environment variable that points to the same android tools directory the script was trying to set. I also had to override the Cordova tools for Visual studio to point to an x64 version of my Java 8 JDK

ANDROID_HOME=C:Program Files (x86)Androidandroid-sdk

After I added that I could build from the Developer CLI.

After editing the Cordova tools options, I could build from withing Visual Studio (Stack Overflow link for this solution):

VS2015_cordova_override.png

Некоторые пользователи сталкиваются с ошибкой «Не удалось создать виртуальную машину Java» при попытке запустить приложение, использующее Java. Сообщается, что эта конкретная проблема возникает с Minecraft и несколькими другими приложениями, построенными на Java.

Не удалось создать виртуальную машину Java.  Ошибка. Произошло фатальное исключение.  Программа будет закрыта.

Что вызывает ошибку «Не удалось создать виртуальную машину Java»?

Мы исследовали эту конкретную проблему, изучив различные отчеты пользователей и стратегии устранения неполадок, которые они использовали для устранения одного и того же сообщения об ошибке. Основываясь на их выводах, существует несколько сценариев, которые могут вызвать данную проблему:

  • Java вызывается из-за неправильных аргументов или опций. Это может произойти, если вы запускаете самодельное приложение или пытаетесь открыть приложение с открытым исходным кодом, которое, как известно, вызывает нестабильность системы.
  • Глобальный максимальный размер кучи Java недостаточно высок. Одна из наиболее частых причин, по которой вы можете столкнуться с этой конкретной ошибкой, — это попытка запустить приложение Java с максимальным размером памяти кучи, превышающим тот, который задан как системная переменная .
  • Исполняемый файл Java и / или приложение требуют прав администратора — это может происходить с приложениями, которым для правильной работы требуется доступ администратора.

Если вы в настоящее время ищете способ устранить ошибку « Не удалось создать виртуальную машину Java» , эта статья предоставит вам несколько проверенных стратегий устранения неполадок. Ниже приведен набор методов, которые другие пользователи в аналогичной ситуации использовали для решения проблемы.

Чтобы обеспечить наилучшие результаты, следуйте приведенным ниже методам в том порядке, в котором они представлены, пока не найдете метод, эффективный для устранения ошибки для вашего конкретного сценария.

Метод 1: добавление _JAVA_OPTIONS в системные переменные

Наиболее затронутым пользователям удалось решить проблему, создав системную переменную для Java с именем _JAVA_OPTIONS и установив для нее значение Xmx512M . По сути, это устанавливает глобальный максимальный размер кучи для Java.

Это устранит любое сообщение об ошибке, возникающее из-за того, что максимальный размер кучи запущенного приложения Java больше, чем тот, который задан как системная переменная. Несколько пользователей, столкнувшихся с той же проблемой, сообщили, что проблема была полностью решена после того, как они выполнили указанные ниже действия.

Вот что вам нужно сделать, чтобы добавить запись _JAVA_OPTION S в системные переменные для увеличения глобального максимального размера кучи:

  1. Нажмите клавишу Windows + R, чтобы открыть диалоговое окно « Выполнить ». Затем введите « sysdm.cpl » и нажмите Enter, чтобы открыть экран « Свойства системы» .
  2. На экране « Свойства системы» перейдите на вкладку « Дополнительно » и нажмите « Переменные среды».
  3. В окне « Переменные среды» нажмите « Создать» (в разделе « Системные переменные» ).
  4. В окне « Новая системная переменная» установите для имени переменной значение _JAVA_OPTIONS и значение переменнойXmx512M и нажмите « ОК», чтобы сохранить изменения.
  5. Закройте ранее открытые окна и перезагрузите компьютер, чтобы изменения вступили в силу.
  6. При следующем запуске откройте приложение, которое ранее показывало ошибку « Не удалось создать виртуальную машину Java», и посмотрите, правильно ли работает.

Создание системной переменной с именем _JAVA_OPTIONS и присвоение ей значения Xmx512M

Если вы все еще видите то же сообщение об ошибке в начале приложения, попробуйте добавить путь Java Bin, который может быть похож на «% USER PATH Java jdk1.6.0_39 bin», к переменной среды, как указано в описанный выше метод и посмотрите, работает ли он.

Метод 2: открытие java.exe с правами администратора

Нескольким пользователям, пытающимся решить одну и ту же проблему, удалось решить проблему после принудительного открытия основного исполняемого файла Java (java.exe) с правами администратора.

Некоторые пользователи сообщили, что им удалось решить проблему после применения этого исправления как к основному исполняемому файлу Java, так и к исполняемому файлу приложения, в котором отображается сообщение об ошибке.

Вот краткое руководство по всему этому:

  1. Откройте проводник и перейдите к месту установки Java. Нам нужно будет добраться до места расположения основного исполняемого файла Java ( java.exe ). По умолчанию вы должны найти его в Program Files / Java / * JRE build version * / bin. Точное расположение будет отличаться в зависимости от того, какую среду выполнения Java вы используете.Перейдите к местоположению java.exe

    Примечание. Если вы установили Java в произвольном месте, перейдите в это место.

  2. Щелкните правой кнопкой мыши java.exe и выберите « Свойства» . Затем перейдите на вкладку « Совместимость » и установите флажок « Запускать эту программу от имени администратора» (в разделе «Настройки»). Нажмите Применить, чтобы сохранить изменения.перейдите на вкладку «Совместимость» и включите «Запускать эту программу от имени администратора».
  3. Щелкните правой кнопкой мыши исполняемый файл приложения (тот, который вызывает ошибку) и повторите ту же процедуру: Совместимость> Запустить эту программу от имени администратора> Применить .
  4. Запустите приложение и посмотрите, исчезнет ли сообщение об ошибке.

Метод 3: переустановка Java

В некоторых случаях ошибка возникает из-за того, что Java могла быть установлена ​​неправильно или ее установка могла быть повреждена с течением времени. Следовательно, на этом этапе мы переустановим Java после ее полного удаления. Для этого:

  1. Нажмите клавишу Windows + R, чтобы открыть окно «Выполнить», и введите «Appwiz.cpl».
  2. Нажмите «Enter», и откроется экран «Программы и компоненты».
  3. На экране « Программы и компоненты» прокрутите список установленных приложений, пока не найдете Java.
  4. Щелкните его правой кнопкой мыши и выберите «Удалить», чтобы полностью удалить его из системы.
  5. Сначала удалите основную установку Java, а позже вы также должны удалить все другие установки Java, такие как обновления и другие версии.
  6. После удаления всей установки перезагрузите компьютер.
  7. После загрузки перейдите по этой ссылке и загрузите последнюю версию JRE.
  8. Проверьте, сохраняется ли проблема.
  9. Если ошибка не исчезла, загрузите и установите последнюю версию JDK отсюда.

    Примечание. Если вы уже используете JDK, попробуйте изменить его версию или удалить JRE, установленную вместе с ним.

  10. Убедитесь, что проблема все еще существует.

Метод 4: исправление ошибок с помощью кода

У этой ошибки есть разные причины, и некоторые из них включают в себя определенные ошибки в вашем коде. Мы выделим некоторые из них ниже.

  • Удаление дефиса : некоторые пользователи отметили, что ошибка была исправлена ​​путем замены двойного дефиса «-» на одинарный «-» в их коде. Например:

    Измените код

    «Sony @ sony-VPCEH25EN: ~ $ java –версия

    Подобрал JAVA_TOOL_OPTIONS: -javaagent: /usr/share/java/jayatanaag.jar

    Нераспознанный вариант: –версия

    Ошибка: не удалось создать виртуальную машину Java.

    Ошибка: возникла фатальная исключительная ситуация. Программа будет закрыта.»

    Чтобы

    «Sony @ sony-VPCEH25EN: ~ $ java -version

    Подобрал JAVA_TOOL_OPTIONS: -javaagent: /usr/share/java/jayatanaag.jar

    Нераспознанный вариант: –версия

    Ошибка: не удалось создать виртуальную машину Java.

    Ошибка: возникла фатальная исключительная ситуация. Программа будет закрыта.»

  • Кроме того, попробуйте удалить следующую строку из своего аргумента

    -Djava.endorsed.dirs = «C: Program Files Apache Software Foundation Tomcat 8.5 endorsed»

  • Откройте файл eclipse.ini и убедитесь, что вы добавили запись «-vm» над аргументами vm, иначе JVM V6 будет выбран в переменных env.
  • Если вы используете Ubuntu, вы должны знать, что Java 8 — единственная поддерживаемая версия. Поэтому пользуемся третьим способом. Удалите Java и установите предыдущую версию.

Метод 5: редактирование файла Eclipse.ini

We can also tweak things inside the Eclipes.ini File to get rid of this issue. There might be a couple of issues with its configuration that need to be addressed therefore, we have divided it into separate issues. Follow the one which suits your scenario the best.

Lowering Memory Use

  1. Open the Eclipse.ini file inside the Eclipse folder with notepad.
  2. Find the line similar to “-Xmx256m” (It might be -Xmx1024m or -Xmx 512m).
  3. Now change the default value to a more reasonable figure depending upon the RAM installed on your computer and add the version number to it as well. For Example:
    -Xmx512m -Dosgi.requiredJavaVersion=1.6 OR -Xmx512m -Dosgi.requiredJavaVersion=1.7 OR -Xmx512m -Dosgi.requiredJavaVersion=1.8
  4. Also, try removing the “256m” value from the “-launcher.XXMaxPermSize” line.
  5. Check to see if the issue persists.

Tinkering Around

  1. Try to remove the following lines from your file.
    -vm P:Programsjdk1.6bin
  2. Also, change the following lines.
    set -Dosgi.requiredJavaVersion=1.5 TO set -Dosgi.requiredJavaVersion=1.6
  3. Also, try adding the following line above “-vmargs!” line.
    -vm C:Program Files (x86)Javajre6binjavaw.exe
  4. Also, point to JVM.dll using the following line.
    -vm C:Program FilesJavajre7binclientjvm.dll
  5. Open the Eclipse file and replace “-vmargs” with the path of javaw.exe. For Example:
    -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813 -product com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 256M -showsplash com.android.ide.eclipse.adt.package.product --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile **-vm “c:Program FilesJavajdk1.7.0_07binjavaw.exe”** -Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx768m -Declipse.buildId=v21.1.0-569685
  6. Also, you can place the following line at the end and check if that works.
    -vmargs -Xms40m -Xmx512m -XX:MaxPermSize=256m
  7. Furthermore, try removing the following lines from the eclipse.ini and check if that works.
    -XX:+UseStringDeduplication -XX:+UseG1GC
  8. Вы также можете попробовать удалить файл eclipse.ini, если проблема не устранена, поскольку, как сообщается, проблема была устранена для некоторых, но не забудьте сначала создать резервную копию на случай, если она вам понадобится. Кроме того, попробуйте закрыть все энергоемкие приложения перед запуском Java, чтобы убедиться в доступности необходимых ресурсов.

Проверка на повреждение JDK

  1. Нажмите «Windows» + «R», чтобы открыть окно «Выполнить», и введите «cmd».
  2. Введите следующую команду и проверьте, выдает ли она ошибку.
    c: > java -версия
  3. Если выдает ошибку, полностью переустановите JDK.

Ошибка «Could not create the Java Virtual Machine» встречается во всех версиях операционной системы Windows. Она появляется как при запуске игр, которые требуют наличие виртуальной машины Java на устройстве, так и при установке самой виртуальной машины на компьютере. Текст ошибки Java Virtual Machine Launcher говорит нам следующее: системе не удалось создать виртуальную машину Java. В этой статье мы с вами рассмотрим причины, по которым возникает эта проблема и, конечно же, устраним саму ошибку.

Скриншот ошибки

Содержание

  1. Причины возникновения ошибки Джава
  2. Устраняем ошибку Java Virtual Machine Launcher
  3. Способ 2. Освобождаем оперативную память ПК
  4. Дополнительные методы устранения ошибки

Причины возникновения ошибки Джава

Чаще всего на появление данной ошибки жалуются игроки Minecraft. При клике на лаунчер и очередной запуск любимой игры, пользователи сталкиваются с окном ошибки. Это происходит из-за того, что в предыдущий раз сессия игры была прекращена некорректно. Возможно вы не дождались полного завершения игры и выключили устройство.

Ошибка JVM при запуске игр и приложений может также возникать по причине недостатка оперативной памяти на вашем устройстве. Для работы виртуальной машины Java требуется определенное количество выделенной памяти компьютером. Для компьютера это очень ценный ресурс, чем этой памяти больше, тем быстрей и лучше процессор справляется с поставленными задачами.

Устраняем ошибку Java Virtual Machine Launcher

Рассмотрим самый распространенный способ исправить ошибку «Could not create the Java Virtual Machine» – создание новой переменной среды.

  1. Нажмите правой кнопкой по иконке «Мой компьютер» и выберите из контекстного меню «Свойства». Меню свойств ярлыка
    Выберите «Свойства»
  2. В следующем окне в блоке слева выберите пункт «Дополнительные параметры».Скрин сведения о системе Виндовс
  3. Далее найдите внизу окна кнопку «Переменные среды».Экран свойств системы Виндовс
  4. Под списком переменных нажмите кнопку «Создать».Картинка переменных среды Виндовс
  5. Введите в первой строке «Имя переменной» – «_Java_Options», а напротив строки «Значение переменной» – значение «-Xmx512M» и подтвердите действия, нажав кнопку «Ок». Перезагрузите компьютер и попробуйте снова сделать те же действия, которые привели к ошибке.

Способ 2. Освобождаем оперативную память ПК

Следующий метод устранения ошибки заключается в освобождении оперативной памяти вашего компьютера. Как уже было сказано, ошибка может возникать по причине недостатка памяти. Чтобы ее освободить, нужно закрыть все ненужные программы, а также «убить» все лишние процессы. Ведь каждая программа нуждается в определенном количестве этого ресурса. На официальном сайте Майкрософт вы можете ознакомиться со всеми важными процессами Windows, прекращение которых повлечет за собой сбои системы. Чтобы остановить лишние процессы:

    1. Нажмите сочетание клавиш CTRL+SHIFT+ESC для Windows 7,8,10. CTRL+ALT+DEL – для Windows XP.
    2. Откроется окно со списком запущенных программ и процессов на вашем ПК.
      Скриншот Диспетчера задач

Чтобы закрыть программу или остановить процесс, нужно выделить мышью название программы или процесса, затем нажать на кнопку внизу окна «Снять задачу».

Некоторые запущенные фоновые программы не отображаются в списке, но их можно увидеть в списке процессов. Эта разнообразные модули обновлений, они работают в фоновом режиме и следят за выходом новых версий определенных программ. Они также потребляют оперативную память. Вашей задачей будет отыскать такие процессы и остановить для решения текущей проблемы. Когда вы очистите память и остановите все ненужные программы и процессы, попробуйте запустить снова игру, чтобы убедиться, что окно с ошибкой «Could not create the Java Virtual Machine» уже не появляется.

Дополнительные методы устранения ошибки

Если программное обеспечение, при запуске которого появляется ошибка, было скачано со сторонних ресурсов, варезных сайтов, торрент-трекеров, то его действия часто блокируют антивирусы. Чтобы избежать такой преграды при запуске вам необходимо проверить список карантина антивируса и, если в нем имеются игры или программы, вы можете их удалить с этого списка. Но будьте осторожны при этом. Ведь такое ПО может действительно нести угрозу для системы. Если вы полностью уверенны в программе или игре, вы можете добавить ее в список исключений. В таком случае антивирус перестанет «подозревать» такое ПО.

Если у вас не установлено программное обеспечение Java, вы можете загрузить его по ссылке https://www.java.com/ru/download/win8.jsp. Попадая на страницу, нажмите кнопку «Согласиться и начать бесплатную загрузку».

Окно установки Java

После этого будет загружен пакет данных, который нужно будет установить на свой ПК.

Причиной ошибки может также стать устаревшая версия Java. Если у вас уже были установлены более ранние версии Java, то их необходимо полностью удалить. Для этого вы можете воспользоваться специальной утилитой, которая помогает найти и проверить все файлы предыдущей версии. Скачать ее можно по следующей ссылке – https://www.java.com/ru/download/uninstalltool.jsp. Часто после полного удаления старой версии Java и установки последней, ошибка «Could not create the Java Virtual machine» навсегда исчезает.

There are many computer applications developed based on Java. When users run these applications, they are supposed to run smoothly.

However, in some instances, errors can pop up and terminate the launch of the respective software. This is usually happening by displaying the error message that starts with ‘could not create the Java virtual machine …’.

If you see this message, the next thing you will experience is that the Java program is stopped. Well, have you ever experienced this error ‘could not create the Java virtual machine …’ error? If so, this article explains the fixes to it. So, read on.

Could Not Create The Java Virtual Machine error

What Causes the ‘Could Not Create The Java Virtual Machine’ Error?

There are several causes behind this issue. Mentioned below are some of those reasons.

  • If Java is invoked with the wrong arguments
    Or if you use unstable software (be it a game or any other app), this issue can occur.
  • If Java global maximum heap memory is not high enough
    This is among the most common causes for sure. In this case, you will have to allocate more memory to resolve the issue.
  • If Java executable file and application is not granted administrative privileges
    To solve this, you should provide administrative privileges.

Besides, if you are bothered by the issue of could not find or load the main class, click to fix it now.

How to Fix the ‘Could not create the Java virtual machine’ Error?

As emphasized in the first paragraph of this article, we are going to explain how to fix this error. In fact, there are multiple solutions to this error, so you should pick the most appropriate one for you. Let’s read on.

Fix 01: Configure a New System Variable

Configuring a new system variable for Java is our first solution to this error. The ‘Could not create the Java virtual machine’ error actually appear when there is not enough memory for it.

In other words, Java requires a substantial amount of memory, and when there is not enough memory, it stops. That means some of the machines that have larger memory capacity experience this issue rarer compared to other machines.

Some of the users have found a solution to this issue simply by expanding the RAM allocated to Java.

Well, to allocate more memory to Java, you may try the following steps and get it done. We use this option as the first method because it is a very easy process.

Steps to Configure a New System Variable

  • As the first step, you should open the ‘Run’ command on your computer. To do this, there are a couple of ways. You can simultaneously hit the Window key and the ‘R’ key on the keyboard to get the ‘Run’ dialog box opened. If not, you can hit the Windows key and type ‘Run‘ in the search box, and select the ‘Run’ option.
  • No matter which method you select, just go to ‘Run.’ Once the ‘Run‘ dialog box is opened, you will see a search bar as well. In this search bar, enter the text’ sysdm.cpl‘. Then, press the button labeled ‘OK.’ You will now see a different window. This Window will comprise the title ‘System Properties.’
Fix Could Not Create The Java Virtual Machine by Configure a new system variable
  • On this Window called ‘System Properties,’ you should select the ‘Advanced‘ tab. Under this option, you will find a button called ‘Environment Variables.’ This will lead you to another window.
  • Click on the option ‘New,‘ located under ‘System variables.’
  • Now, you should enter ‘_JAVA_OPTIONS.’ This should be entered inside the Variable name text box.
  • Afterward, you should enter ‘_Xmx512M‘ within the Variable value text box. Well, this option will increase RAM allocation by 512 megabytes.
  • To complete the process, you should click the ‘OK’ button.
  • You can also press the ‘OK’ button on the ‘Environmental Windows.’
  • That’s it, and 512MB RAM will be allocated.

Fix 02: Make ‘Run’ as an Administrator Option for Java

If the previous option doesn’t work for you, you will have to try a different option. If it doesn’t work, the error might be something else.

In fact, ‘Could not create the Java virtual machine …’ can occur due to insufficient admin rights to Java. Using Windows 10, you can fix the issue using the following steps.

  • In Windows 10, you should open Cortana. To do this, you should hit Windows Key with the ‘Q’ key on the keyboard.
  • Now, you will see a search box appearing. In this box, enter ‘Java.’
  • Then, you will be able to see the ‘Java‘ option. Right-click on this option and then select the option called ‘Open File Location.’
Run Java with administrator to Fix Could Not Create The Java Virtual Machine
  • This option will open the folder of Java in the File Explorer window.
  • You can now go to the java.exe file and then right-click on it. You will then be able to select the ‘Properties’ option.
  • Then select the tab labeled ‘Compatibility.’
  • After selecting the ‘Compatibility‘ option, you should select ‘Run this program as an administrator.
  • To complete the process, you should select the option ‘Apply.’
  • Click ‘OK‘ so you can finish the process.

Fix 03: Install Java Once Again

If none of the above options have worked so far, the cause of the issue might be something different.

So, as another remedy, you should try reinstalling Java and check if it resolves the issue. After reinstalling Java, you can expect the ‘Could not create the Java virtual machine‘ error to be gone.

So, to get it done, you should first uninstall the existing version of Java. For that, you must go to the control panel of the machine. To access the control panel, there are several options you can consider.

For instance, you can either choose a long way or a shortcut. As we believe, entering the text ‘appwiz.cpl.’ within the ‘Run’ box is the most convenient way.

Steps to Reinstall Java

  • Then, in the search box, you should enter ‘Java.’ If not, you can simply scroll down until you find the Java option.
  • Now, select the ‘Java’ option and click on ‘Uninstall.’
  • You may now click on ‘Yes’ on the confirmation box, which will pop up.
  • Now, restart the Windows computer after the installation.
  • Open a web browser of your preference and go to the Java download page.
  • Make sure you choose the appropriate software version for the operating system running on your computer. For instance, if you have a 32-bit Windows OS, you should choose the 32-bit Java file. However, if the operating system runs on 64-bit, you should choose the 64-bit version accordingly. If you are doubtful about the version, you may try installing both Java files. To do this, you should go to the Windows Offline file.
  • Whether you have selected the 32-bit version or the 64-bit version, you must now open the Java setup wizard.
  • Click on the option labeled ‘Install,’ which appears as a button on this setup wizard you have just launched.
Reinstall Java to fix Could Not Create The Java Virtual Machine

That is exactly how to fix the ‘Could not create the Java virtual machine ….’ Issue. This is also known as Java Virtual Machine fatal error.

As we believe, the resolutions we have mentioned above can address this issue for good. Once the issue is fixed, you can run the required Java software without any issues.

This website uses cookies to ensure you get the best experience on our website

Понравилась статья? Поделить с друзьями:
  • Exchange проверка почтового ящика на ошибки
  • Exchange ошибка 500 ecp
  • Exchange error 5000
  • Exchange error 500 owa
  • Exchange error 403