You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flutter doctor is happy with just JRE, but builds fail without JDK #10351
While trying to fix an issue with flutter (Could not reserve enough space for 1572864KB object heap) I uninstalled 32bit java and installed 64bit. I picked the JRE isntead of JDK and flutter doctor was happy; but builds failed claiming I needed the JDK:
Installing the JDK fixed the issue. It would be good if flutter doctor could check this.
changed the title [-]Flutter doctor is happy with just JRE, but builds fail without JDK[/-][+]Flutter doctor is happy with just JRE, but builds fail without JDK [/+]on Jan 13, 2020
Is this still relevant? I am not able to reproduce
flutter doctor -v
[√] Flutter (Channel unknown, 2.3.0-17.0.pre.445, on Microsoft Windows [Version 10.0.19042.985], locale en-US)
• Flutter version 2.3.0-17.0.pre.445 at C:\use\flutter\clone\flutter
• Upstream repository unknown
• Framework revision de0a5e086d (5 hours ago), 2021-06-23 04:01:02 -0400
• Engine revision 40edba381e
• Dart version 2.14.0 (build 2.14.0-236.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\ahmed_ashour\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Java\jre1.8.0_291\bin\java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.2)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.10.31410.357
• Windows 10 SDK version 10.0.19041.0
[!] Android Studio (version 4.2.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] IntelliJ IDEA Community Edition (version 2021.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 212.4037.9
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.57.1)
• VS Code at C:\Users\ahmed_ashour\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (2 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.985]
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114
! Doctor found issues in 1 category.
logs
C:\use\delme\mytest>flutter clean
Deleting build... 10ms
Deleting .dart_tool... 24ms
Deleting .packages... 1ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
C:\use\delme\mytest>flutter run
Running "flutter pub get" in mytest... 728ms
Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome... 19.6s
This app is linked to the debug service: ws://127.0.0.1:56938/wGwiVoRkmjE=/ws
Debug service listening on ws://127.0.0.1:56938/wGwiVoRkmjE=/ws
Running with sound null safety
To hot restart changes while running, press "r" or "R".
For a more detailed help message, press "h". To quit, press "q".
An Observatory debugger and profiler on Chrome is available at: http://127.0.0.1:56938/wGwiVoRkmjE=
The Flutter DevTools debugger and profiler on Chrome is available at:
http://127.0.0.1:63509?uri=http%3A%2F%2F127.0.0.1%3A56938%2FwGwiVoRkmjE%3D
Activity
ronlobo commentedon May 27, 2017
Fully agree! That would be great!
[-]Flutter doctor is happy with just JRE, but builds fail without JDK[/-][+]Flutter doctor is happy with just JRE, but builds fail without JDK [/+]asashour commentedon Jun 23, 2021
Is this still relevant? I am not able to reproduce
flutter doctor -v
logs
DanTup commentedon Jul 7, 2021
@asashour I think the error only occurs when building for Android (I think that's the only target that requires Java).
andrewkolos commentedon Apr 12, 2023
Still reproducible on master (0a140c6) using Azul Zulu JRE 17.40.19.
A solution might be to check for a
javacbinary1 instead or in addition to thejavabinary during the Android toolchain validation (code).Footnotes
Any other JDK-specific file would probably work as well. ↩
flutter-triage-bot commentedon Jun 27, 2025
The
triaged-toollabel is irrelevant if there is noteam-toollabel orfyi-toollabel.Resolve issue flutter#10351: Detect JRE-only Java installations (miss…
Resolve issue flutter#10351: Detect JRE-only Java installations (miss…
fix: resolve issue flutter#10351 by checking for javac (JDK) in docto…