This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 257092 - NB C++ Installer prompts for JDK
Summary: NB C++ Installer prompts for JDK
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 8.1
Hardware: PC All
: P2 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-10 09:46 UTC by matjazfinc
Modified: 2016-02-18 13:59 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Message dialog (22.98 KB, image/png)
2015-12-10 11:12 UTC, matjazfinc
Details
Ubuntu 14.04 (2.40 MB, text/plain)
2016-02-05 18:15 UTC, soldatov
Details
Ubuntu 14.04 (2.31 KB, text/plain)
2016-02-05 18:16 UTC, soldatov
Details
List of modules updated via Tools > Plugins not corrupting the installation. (3.50 KB, text/plain)
2016-02-05 20:58 UTC, Jiri Kovalsky
Details
command line updater output (8.92 KB, text/plain)
2016-02-08 17:09 UTC, Alexander Pepin
Details
updater.log (584.28 KB, text/plain)
2016-02-08 17:10 UTC, Alexander Pepin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matjazfinc 2015-12-10 09:46:42 UTC
NetBeans 8.1 C++ x64 installer prompts with the message that JDK is required - disable modules and continue or exit?

The Download page says:
HTML/JS, PHP and C/C++ NetBeans bundles include Java Runtime Environment and do not require a separate Java installation.

Prior to installation old NetBeans versions and Java were removed from the system.
Comment 1 matjazfinc 2015-12-10 11:12:47 UTC
Created attachment 157746 [details]
Message dialog
Comment 2 matjazfinc 2015-12-10 11:14:27 UTC
1) Removed improper NB 8.1 C++ x64 installation
2) installed jdk-8u66-windows-x64.exe
3) Install NB 8.1 C++ x64 again - the same "JDK missing" warning appears!
Comment 3 Libor Fischmeistr 2015-12-12 09:41:36 UTC
Hi, thanks for report, please attach the installer log - http://wiki.netbeans.org/NBIFAQ#What_information_is_needed_for_a_successful_bug_report.
Comment 4 soldatov 2016-02-05 17:21:11 UTC
I see same dialog on my MacOSX machine
Comment 5 soldatov 2016-02-05 18:15:21 UTC
Created attachment 158390 [details]
Ubuntu 14.04
Comment 6 soldatov 2016-02-05 18:16:01 UTC
Created attachment 158391 [details]
Ubuntu 14.04
Comment 7 soldatov 2016-02-05 18:16:30 UTC
Same problem on Linux too
Comment 8 soldatov 2016-02-05 18:34:43 UTC
How To Reproduce:
- Download NetBeans C++ only
- Launch installer
- "Check for Updates" checkbox must be selected
==> I see:
NetBeans-8.1
  bin
  cnd
  cndext
  dlight
  etc
  extide
  harness
  ide
  java <===== What is it?
  nb
  platform
Comment 9 Jiri Kovalsky 2016-02-05 20:58:26 UTC
Created attachment 158393 [details]
List of modules updated via Tools > Plugins not corrupting the installation.

Reproduced if update is part of vanilla installation. If user unchecks the option and updated the CND distro later manually in the IDE, everything works fine.
Comment 10 Alexander Pepin 2016-02-08 10:38:53 UTC
It looks like additional modules required for mixed development (java and cndext) are installed in that case. When IDE starts those modules are also loaded (but not activated) and require JDK as well. So it seems to be a bug in module dependencies.
Comment 11 Vladimir Voskresensky 2016-02-08 12:19:55 UTC
cnd.mixeddev is an Eager module and has correct set of dependencies.
Installer should be consistent with IDE behavior.
1) Manual update of CND distro from within IDE  - OK
2) install C++ only from installer with check-for update mode - broken
Comment 12 Libor Fischmeistr 2016-02-08 14:08:40 UTC
Reassigning to CND team. Please evaluate. The installer work well when not updating. If the update is enabled, the installer can finish, but the IDE is "broken" - requires JDK because Java cluster is present. It looks like that in CND silent updates there are some broken dependencies requiring Java from some reason...

Installer doesn't "manage" the update proccess. Installer is only launching update command - C:\Program Files\NetBeans 8.1\bin\netbeans.exe --fork-java -J-Dnetbeans.close=true --nosplash -J-Dorg.netbeans.core.WindowSystem.show=false -J-Dplugin.manager.install.global=true --userdir C:\Users\lfischme\AppData\Local\Temp\tmpnb --modules --update-all

So to test the update like installer, use these switches to run IDE - "--fork-java -J-Dnetbeans.close=true --nosplash -J-Dorg.netbeans.core.WindowSystem.show=false -J-Dplugin.manager.install.global=true --userdir <clean userdir> --modules --update-all"
Comment 13 Jiri Kovalsky 2016-02-08 14:12:34 UTC
BTW, if the same is done with PHP distro, IDE is not corrupted after installation with updates i.e. no Java cluster is created and enabled. So this is CND distro specific.
Comment 14 Vladimir Voskresensky 2016-02-08 16:23:46 UTC
I think the PHP vs. CND distros difference is that PHP is located completely inside one "php" cluster. While cnd has two: cnd and cndext.
The cnd is like php - it doesn't depend on java cluster
The cndext as the cluster has build but *not* runtime dependency on java cluster.
java is required to build eager cnd.mixeddev module.

So, I think with CND everything is OK.

Could you, please, help us to debug update scenario (I hope you know some logging flags) to see who treat "runtime" java dependency of eager module into "install" dependency
Comment 15 Alexander Pepin 2016-02-08 17:09:11 UTC
I've run updater from the command line on Linux as was suggested
/export/home/pep/netbeans-8.1/bin/netbeans -J-Dnetbeans.close=true --nosplash -J-Dorg.netbeans.core.WindowSystem.show=false -J-Dplugin.manager.install.global=true --modules --update-all

The behavior was exactly the same as when running from the installer with the checked checkbox. A window requiring JDK appeared in the end of the updating process. Please see results in attachment.
Comment 16 Alexander Pepin 2016-02-08 17:09:55 UTC
Created attachment 158421 [details]
command line updater output
Comment 17 Alexander Pepin 2016-02-08 17:10:58 UTC
Created attachment 158422 [details]
updater.log
Comment 18 Alexander Pepin 2016-02-08 18:20:09 UTC
The command line option '--update-all' looks suspicious for me. It probably forces an updater to update all existing modules. I think that when a user calls 'check for updates' form running IDE then only loaded modules are checked and in that case cnd.mixeddev is not checked as it's not loaded without java cluster (has eager=true in config). If I'm right that could explain different behavior of install+update and manual update processes.
Comment 19 Alexander Pepin 2016-02-09 12:49:20 UTC
Returning it back to Installer team. Please look at the latest comments.
Comment 20 Martin Entlicher 2016-02-09 14:18:18 UTC
Isn't the "Mixed Java/Cpp Development Support" causing an enabling of JPDA Debugger, which needs full JDK?
Comment 21 Alexander Pepin 2016-02-09 14:51:12 UTC
Martin, if you look at the manifest of org-netbeans-modules-cnd-mixeddev.jar placed in 'cndext' cluster you'll see that it depends on number of java modules
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.9.2
Created-By: 1.7.0_67-b01 (Oracle Corporation)
OpenIDE-Module-Public-Packages: -
OpenIDE-Module-Module-Dependencies: org.netbeans.api.debugger/1 > 1.46
 .2, org.netbeans.api.java.classpath/1 > 1.42.1, org.netbeans.api.prog
 ress/1 > 1.45, org.netbeans.api.templates > 1.3, org.netbeans.libs.ja
 vacapi > 8.11.0.3, org.netbeans.modules.cnd.api.model/1 > 1.31.8.1, o
 rg.netbeans.modules.cnd.api.project/1 > 1.31.2.1, org.netbeans.module
 s.cnd.api.remote/1 > 1.22.3.1, org.netbeans.modules.cnd.debugger.comm
 on2/3 > 3.25.10.3, org.netbeans.modules.cnd.makeproject/2 > 2.48.11.1
 , org.netbeans.modules.cnd.model.services/1 > 1.42.11.1, org.netbeans
 .modules.cnd.modelutil/1 > 1.31.10.1, org.netbeans.modules.cnd.toolch
 ain > 1.29.4.1, org.netbeans.modules.cnd.utils > 1.43.11.2, org.netbe
 ans.modules.dlight.libs.common > 1.32.1.1, org.netbeans.modules.dligh
 t.nativeexecution > 1.34.2.1, org.netbeans.modules.dlight.remote > 1.
 25.9.1, org.netbeans.modules.editor.lib/3 > 4.2.0.22.1.43, org.netbea
 ns.modules.editor.lib2/1 > 2.2.0.43, org.netbeans.modules.editor.mime
 lookup/1 > 1.36, org.netbeans.modules.java.editor.lib/1 > 1.34, org.n
 etbeans.modules.java.j2seproject/1 > 1.75.1.48, org.netbeans.modules.
 java.lexer/1 > 1.28, org.netbeans.modules.java.platform/1 > 1.35.1, o
 rg.netbeans.modules.java.source > 0.146.0.32, org.netbeans.modules.ja
 va.source.base > 2.3, org.netbeans.modules.lexer/2 > 1.59.0.1, org.ne
 tbeans.modules.projectapi/1 > 1.60, org.netbeans.modules.projectuiapi
 /1 > 1.78.0.8, org.netbeans.modules.projectuiapi.base/1 > 1.79, org.n
 etbeans.modules.settings/1 > 1.47, org.openide.awt > 7.62.1, org.open
 ide.dialogs > 7.38.1, org.openide.explorer > 6.60, org.openide.filesy
 stems > 9.5, org.openide.loaders > 7.57, org.openide.nodes > 7.39, or
 g.openide.text > 6.62, org.openide.util > 8.39, org.openide.util.look
 up > 8.25, org.openide.util.ui > 9.3, org.openide.windows > 6.73
OpenIDE-Module-Java-Dependencies: Java > 1.7
OpenIDE-Module-Implementation-Version: 201512151638
AutoUpdate-Show-In-Client: false
OpenIDE-Module: org.netbeans.modules.cnd.mixeddev
OpenIDE-Module-Layer: org/netbeans/modules/cnd/mixeddev/resources/laye
 r.xml
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/cnd/mixeddev/Bu
 ndle.properties
OpenIDE-Module-Specification-Version: 1.1.4
OpenIDE-Module-Requires: org.openide.windows.WindowManager, org.openid
 e.modules.ModuleFormat1


But the question is the following:
Why does update work fine when it's running from the IDE and why does it fail if it's running from the installer?
Comment 22 Libor Fischmeistr 2016-02-09 15:41:07 UTC
(In reply to Alexander Pepin from comment #21)
> But the question is the following:
> Why does update work fine when it's running from the IDE and why does it
> fail if it's running from the installer?

I think the cause is in some wrong dependency. The "Mixed Java/Cpp Development Support" looks suspicious but the issue may also be in the AU not the installer (I've already reassigned it).

You are right it's weird that two updates behave differently. I'm trying to investigate...
Comment 23 Libor Fischmeistr 2016-02-10 15:37:36 UTC
It's like the Alexander wrote. When you update from running IDE via Plugin Manager only enabled modules are updated. When the IDE is launched from command line with --update-all switch all present modules and their dependencies are updated. In that case the org.netbeans.modules.cnd.mixeddev module causes that some Java modules are installed.

I'm going to test if after the "updating" installation IDE can launch or not. If yes, we should prepare to possibility, that we will have to ignore this issue :(
Comment 24 Libor Fischmeistr 2016-02-15 12:53:50 UTC
After many discussions we have final solution. The update option during installation is going to be disabled for C/C++ distribution.

We consider it the safest and the most reliable solution.

The installers are going to be rebuilt with the proper IDE build and the bits of C/C++ distribution will be replaced with the new ones.
Comment 25 DimaZh 2016-02-15 13:16:31 UTC
OK, please proceed with this solution. It is rather low usability impact and considering Patch1 to be released ASAP, it is a good workaround.
Comment 26 Jiri Kovalsky 2016-02-15 13:40:16 UTC
Great. Once the re-built installers are staged somewhere, Jirka (Cc:ed now) will test all 5 installers.
Comment 27 Libor Fischmeistr 2016-02-15 15:10:43 UTC
Fix in release81 - http://hg.netbeans.org/releases/rev/39a7d3e2e8c9
Comment 28 Jiri Kovalsky 2016-02-18 13:59:24 UTC
Verified. Thanks for the fix.