NBWithBundledJRE
What if we wanted IDE to run on bundled JRE
Motivation
Bundling a specific version of JRE with NetBeans would bring us several significant advantages.
The IDE would be certified against this particular JRE and we could be sure at our FCS date that future Java updates don't break our functionality with regressions, as was the case with 6u12 and 6u14 recently. Testing would be largely simplified as well, the matrix for testing would consists of only one JRE per one OS. We could also use some advantages of this particular JRE version, for example being it 32-bit JRE on all platforms, we would effectively eliminate any 64-bit related problems, e.g. Embedded Browser unavailability on 64-bit.
Consequences
- increased download size
- Windows: 16MB
- Linux: 20MB
- Mac OS X: 0 (no Sun JRE available)
- Solaris-x86: 19MB
- Solaris-sparc: 24MB
- any licensing issues?
- 32 vs 64 bit
- We should be aware of 64-bit Linux systems without 32-bit support installed. On such systems NB installer would not start.
Changes needed to support bundled JRE
- Installer
- The way how it could be done:
- JRE is bundled into installer, used for installer execution and installed as non-optional component.
- During the installation process if user chooses to install something that requires JDK (Java versus PHP) then he will be able to specify existing JDK location
- Open Questions/Problem areas
- Location of the private JRE on the system. It's private so we should not put it into e.g Program Files but also present uninstallation scheme prevents from putting it into NetBeans installation folder.
- Mac OS X: There is no Sun JRE
- Project System
Currently JDK we run on top of is the default Java platform for user's projects, this must change, so that the JVM we run on top of is not used by project system at all.
java.j2seplatform might need some changes to deal with the possibility of there being no default Java platform. Not sure if it really matters, since for people installing Java tools we would anyway ask them in the installer to configure at least an initial JDK.
- Java
Is anything used from the JDK we run on top of, or is the default Java platform pointing to some JDK enough?
- Debugger - needs tools.jar in the JVM the IDE runs on. Not sure if just adding tools.jar from the same JDK build to JRE would work, perhaps yes.
- Matisse - needs dt.jar (for BeanInfo classes and images for Swing components) in the JVM the IDE runs on. Should be enough to add it to IDE boot classpath.
- Profiler - needs tools.jar from the JVM the IDE runs on. Note that tools.jar is needed just for the dynamic attach functionality. Everything else can run on JRE.
Issues
- Updating the bundled JRE?
The bundled JRE might contain a bug which would be revealed after our release. We must be able to update the JRE through autoupdate mechanism.
- 3rd party plugins requiring JDK as the VM we run in?
Are there any 3rd party plugins requiring JDK as the VM we run on top of? What could we do with that?

