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 127678 - Installer should allow for JRE only
Summary: Installer should allow for JRE only
Alias: None
Product: installer
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: dlipin
: 130056 (view as bug list)
Depends on: 135512
  Show dependency tree
Reported: 2008-02-18 18:41 UTC by _ gsporar
Modified: 2008-11-25 09:06 UTC (History)
10 users (show)

See Also:
Exception Reporter:

last installer's panel with the "missing JDK" message (84.07 KB, image/png)
2008-09-30 14:45 UTC, Ondrej Langr

Note You need to log in before you can comment on or make changes to this bug.
Description _ gsporar 2008-02-18 18:41:17 UTC
There is at least one configuration of the NetBeans IDE that does not require the full JDK in order to run: the
Ruby-only download.

As support for more and more languages are added to the NetBeans IDE, it seems we need to re-think the requirements for
installation/running of the IDE.

Currently, the installer requires a JDK even though the installer *itself* only needs the JRE.  Since most of the user
base wants the Java support in the IDE, this makes sense because the IDE cannot support the Java programming features
without the full JDK.

But as noted above, the full JDK is not necessary for providing the Ruby programming features of the IDE.  The IDE works
just fine with the (much smaller) JRE in that use case.

Needless to say, this opens up quite a few issues.  Perhaps the most complicated one being: what happens when a user who
 only has a JRE does an initial install of features that only require the JRE but then later tries to add plugins that
require the JDK?

Should there be a warning displayed and then just go ahead anyway?  Or refuse to install the plugins?  If the decision
is made to refuse to install the plugins and the user does his own install of the JDK and tries again then how will
NetBeans go about trying to locate that JDK installation?  Automatic search?  Or prompt the user?  Etc....
Comment 1 dlipin 2008-03-13 16:08:38 UTC
*** Issue 130056 has been marked as a duplicate of this issue. ***
Comment 2 dlipin 2008-06-02 17:39:32 UTC
CC-ing Jano and Alexei.

The initial implementation is done and would be available in the next daily build >2008060200 (commits 655511e7f622, 
2fe9116e113d, 220e30d3c85f)

If user runs Ruby/PHP/Cpp installer then he should be able now to select JRE for NetBeans IDE.
If user runs All installer and select feature that do not require javase then, again, he should be able to select JRE 
for NetBeans usage.

Nevertheless there are stille a bunch of open questions that should be solved.
In the installer the following NetBeans panel is shown, where user can select NetBeans installation folder and choose 
Now, when we can use JRE, the panel messages should, probably be different: in current messages we refer to JDK and it 
is inappropriate in the Ruby/PHP/Cpp scenarios. I see the following list of strings as the candidate for "JDK" 
- JDK or JRE
- Java
I personally prefer "Java" for its simplicity but I can`t say whether it is obvious or not for the other users.
The advantage is that we can use it both for JDK-dependent installation (JavaSE/JavaEE/Mobility/...) and JRE-dependent 

The list of strings with "JDK" usage is the following (including various warnings and errors):
- Choose the installation folder and JDK(TM) for the NetBeans IDE.
- JDK(TM) for the NetBeans IDE:
- Setting the appropriate JDK home
- Cannot set the selected JDK home
- The path to the JDK cannot be empty.
- The specified JDK folder {0} is invalid.
- The specified JDK folder {0} does not exist.
- The specified JDK folder {0} does not contain JDK.
- The specified JDK folder {0} contains JRE, but a full JDK is required. (* - this one will not be used for JRE-
dependent installations)
- The specified JDK folder {0} contains JDK version "{1}", while the minimum is JDK "{2}".
- The specified JDK folder {0} contains JDK version "{1}", while the maximum is JDK "{2}".
- The specified JDK folder {0} contains JDK from the unsupported vendor ({1}). The supported vendors are "{2}".
- The installer could not find a compatible JDK installation. The minimum required version is {0}. Specify JDK folder 

The next open question is the installer behaviour in the following scenario:
1) User starts All installer and install Base+Ruby with JRE (not JDK) selected for NetBeans usage
2) User run the same installer again add additionaly install any JavaSE-dependent components (JavaSE/Mobility/EE/UML/
Following this scenario in current installer, the user would not see the NetBeans configuration panel and JRE, that was 
selected during first installation should be used by NetBeans even after other components installation.
As the result, the user will got missing modules warning (discussed at the Issue 135512 and on wiki http:// 
Certainly, this scenario will not be used much by most of the users but nevertheless we should address it as well.

I see one of the possible solutions :
1) When following this scenario, show, again, NetBeans configuration panel with disabled fields for NetBeans folder and 
corresponding browse button. The user should choose one of the JDK listed on this panel.
2) Do not show the configuration panel but search for any suitable JDK on the system and update etc/netbeans.conf with 
it during installion without any notification. If no JDK found - do not do this step and thus show missing modules 
warning during IDE start. 
Another option - do not proceed with installation in that case and show an error message (at which panel?)
3) Create another installation panel (similar to 
jdk.png) - without NetBeans installation folder field and label and Browse buttton at all but with JDK label,field and 
browse button. On this panel we would say something like the following : "NetBeans is already installed at <...>. It is 
configured to use JRE at <...>. You have selected <JavaSE|UML|SOA|...> to be installed that require the JDK to work. 
Please select one of the following JDKs to be used by NetBeans".

There could be certainly other solutions but I don`t see realize them at this moment.
Comment 3 jrojcek 2008-06-03 14:23:22 UTC
Ccing Ondrej who would take care of the specific user experience questions.

My opinion is that if just the JRE is needed, then we shouldn't show any Java field in the NetBeans installer panel. We should just use the best JRE suitable for running 
the IDE we found during the initial JRE scan. In other words use the same JRE that is used for running the installer. That means we also need to update the warning 
message that is currently shown if no JRE/JDK is found on the computer which means we cannot run the installer (I guess it currently talks about the JDK, not JRE).

For the update scenario, I agree we need to inform the user we suddenly require JDK. The specific UI is TBD.

We also need to cover the update scenario through the plugin manager.

Comment 4 Antonin Nebuzelsky 2008-06-03 16:47:57 UTC
> For the update scenario, I agree we need to inform the user we suddenly require JDK. The specific UI is TBD.
> We also need to cover the update scenario through the plugin manager.

Please join the issue 135512 and the wiki topic linked from there for discussion of the update scenario.
Comment 5 Ondrej Langr 2008-06-04 15:53:00 UTC
My point of view on how to best proceed in each scenario: 

sc1) User is installing the IDE in configuration which does not require JDK
My suggestion: Autodetect best JRE or JDK and continue. We probably do not even need to display the Java field in the

sc2) User attempts to add a bundle requiring JDK to IDE running on JRE, using the full installer
My suggestion: Users should be warned that the IDE is running on JRE and that the module they selected will require JDK
which they do not have. This can be probably done directly when selecting the package or very soon in the installation
wizard. If we do not need JDK for installation (but only for running the IDE) we should allow to continue and install
the features without the JDK and provide users with link to JDK download on the last panel. 
If we do require JDK, not only for running the IDE but also for installation of these features, we need to interrupt the
installer at this point. 

Note: If we autodetect JDK in this particular scenario, we should IMO just use it without asking the user whether they
really want to use the auto-detected version. This is because these users are most likely PHP/Ruby developers who are
starting/evaluating java part of the IDE and as such they are not likely to be very picky about JDK version).

sc3) User attempts to add modules requiring JDK to IDE running on JRE, using plugin manager
Best UI here is no UI, so if we manage to make this work without any user interaction (depending modules with tools.jar
bundled - as Jesse suggests in issue #135512), it's an ideal solution from users' point of view. Otherwise, we should
display the warning as soon as plugin is selected in plugin manager or possibly on the first screen of plugin installer.
The message could look something like: 

"Following plugins require JDK while NetBeans IDE is running on JRE. To use these plugins, you will be required to
download and install JDK"

Dmitry, does it answer all your open questions? 
Comment 6 dlipin 2008-09-17 15:28:15 UTC
Hi Ondrej,

I think that scenario 1 is now totally covered by installer and scenario 3 totally covered by PM, right?

To close the issue entirely, we should cover scenario 2 in installer. 
In my understanding it is a little bit different as described in 138227: 
That issue is about the case of the initial installation of the IDE with plugins when JDK is not found. The warning 
message "No compatible JDK was found" is shown in that case.

This issue is about different case: if NetBeans is already installed (partially) and configured to use the JRE and the 
user selected new plugins which require JDK. So the following is not clear:
1) what message should be shown on the welcome page to clear that situation?
2) regarding "...and provide users with link to JDK download on the last panel" - what message should we show in that 
case (with regards to existance of package systems - rpm, deb, ips, etc - on some platforms)? is it a necessary thing 
or can be dropped ? 
Comment 7 Quality Engineering 2008-09-22 17:25:28 UTC
Integrated into 'main-golden', will be available in build *200809221401* on (upload may still be in progress)
User: Dmitry Lipin <>
Log: Issue #127678 Installer should allow for JRE only
Comment 8 Ondrej Langr 2008-09-30 14:43:03 UTC
First, I apologize for the delay. I somehow missed Dmitry's request.

> I think that scenario 1 is now totally covered by installer and scenario 3 totally covered by PM, right?
Scenario 1 - yes, verified. Scenario 3 - AFAIK, yes. 

> 1) what message should be shown on the welcome page to clear that situation?
Just to make sure, we're talking about installer's welcome page, right? I've checked what's currently in trunk and it
seems good to me in terms of workflow and information structure. I would (after having discussed with the documentators)
suggest slightly different messages: 
Warning in the installation customizer: "Some of the selected packs require JDK to run." 

> 2) regarding "...and provide users with link to JDK download on the last 
> panel" - what message should we show in that case (with regards to 
> existance of package systems - rpm, deb, ips, etc - on some platforms)? 
> is it a necessary thing or can be dropped ?

AFAIK, the package systems shouldn't play much role here, but I'm not an expert in this. I've talked to a designer
working on Java and he claimed that everyone (= all platforms) should be able to get JDK from, so my suggestion is to link this page from the last installer panel
together with the information that the JDK has not been detected (see the attached screenshot for the exact message and
Comment 9 Ondrej Langr 2008-09-30 14:45:05 UTC
Created attachment 70902 [details]
last installer's panel with the "missing JDK" message
Comment 10 dlipin 2008-09-30 15:17:44 UTC
Hi Ondrej,

Thanks for the update!
Regarding p.1 - yes, we are talking about installer welcome panel. This one is fixed:

Regarding p.2. 
Imagine the situation: User installs the IDE on JRE, later he runs the installer and adds Java-related packs which 
requires JDK to run. Yes, we should warn user about the fact that NB is configured to use the JRE.
But shouldn`t we additionaly explain to user how to re-configure the IDE after (s)he installs the JDK ?
(maybe point to another link - or

Please note that I thought of p.2 in a different manner. I though of the case when the IDE is partically installed, 
configured to use JRE and we install new Java-related stuff. We don`t search for JDK/JRE in this case so we can`t say 
for sure whether it is installed on the system or not. That`s why the proposed message is not well-suitable for this 
Some of the installed components require the JDK which was not detected on your computer. You can download and install 
the JDK from http://...

I agree with you - we should provide the link to JDK download - but we should also give user an option to re-use one of 
the existing JDK installation if (s)he has some (even we haven`t seached for it).
I think we need the message with the following meaning:
Some of the installed components require the JDK while NetBeans was configured to use the JRE.
If you don`t have JDK on your computer, you can download it and install from http://...
To configure NetBeans to use the particular JDK see the instructions at ...

What is opinion, Ondrej?
Comment 11 Ondrej Langr 2008-10-09 18:32:39 UTC
Hi Dmitry, the suggested message seems fine. However, can't we perform the search for JDK when user running NetBeans on
JRE attempts to install packs requiring it? If we did detect it, we could automatically re-configure NetBeans to use the
JDK and wouldn't have to bother the user with any messages. If we didn't, we could provide the message you are suggesting. 

Is this feasible? 
Comment 12 Petr Jiricka 2008-11-24 09:44:57 UTC
Hi Dima, can this issue be now closed as fixed? Or is there some part of it that still needs to be done? 
If anything is missing, then we could still close this one and create a new issue for the missing aspects. Thanks.
Comment 13 dlipin 2008-11-24 16:04:28 UTC
Petr, yes we can mark is fixed.
The missing part is somewhat Ondrej suggested in the last message (Thu Oct 9 17:32:39 +0000 2008).
Comment 14 Petr Jiricka 2008-11-25 09:06:10 UTC
Again, thanks for resolving this in NetBeans 6.5. This is very important for the non-Java distributions.