Currently the .exe launcher only supports starting NetBeans on full JDK
installation. The NetBeans platform however does not require the JDK. (JRE is
enough - JDK is only needed for some modules e.g. Java).
Thus the .exe launcher should support starting netbeans on JRE.
(Possible workaround until this enhancement is implemented is to use the
outdated .bat files in bin/unsupported directory with small changes in the
AFAIK the .sh launcher supports JRE-only operation, though it is not
convenient. It should accept a -jrehome as well as -jdkhome switch.
Target milestone was changed from '3.4' to TBD.
Correction -- Java module should no longer depend on packages from
JDK; if the user sets up path to external tools (the default assumes
that NB runs on JDK), NetBeans may run on JRE while developing for Java.
Good. Do you know of any modules which still assume that tools.jar is
in the classpath? I know form.jar assumes dt.jar is in the classpath.
I'd like to understand what features in the Platform
distribution depend on the JDK. Ideally it would have the
same functionality it does on 3.4 but not require JDK.
Having end users install JDK seem inherently wrong.
No features in the Platform distribution require the JDK. It is a
historical accident that the launcher tries to include
$jdkhome/lib/*.jar in the classpath and complains when they are not
there - hence this issue.
Correction - the Unix launcher works fine (AFAICT) with the JRE. Just
pass -jdkhome /path/to/jdk/jre and it uses the JRE only. JPDA Debugger
module (e.g.) will be disabled. So it is just the Windows launcher
which is broken.
Yes, the Windows launcher which is broken !
With NB Platform version 3.4 on Win2k using
sun JRE version 1.4.1_01 (other java software
works fine using the jre 1.4.1_01 !).
Launching the bin/runidew.exe of the Platform,
we get a message like this:
"JDK 1.3 or higher compatible virtual machine
not found on your system".
The problem is in the runide.exe!
-with "-jdkhome "C:\pathToJRE"" added to
ide.cfg, it complains with "cannot load
- with "-jrehome "C:\pathToJRE"", it fails
with an "unknown option: -jrehome"
Note: every BAT scripts in "unsupported"
directory in netbeans/bin gives even worse
Created attachment 9235 [details]
Patched CPP to run jre
The previous attachement works fine on our
test machine with a branded version of
Patch just add to the runide.cpp an entry for
the JRE. If a JDK is also installed, JDK takes
precedence over JRE. It was tested with Sun
jre 1.4.1_02 under win2k.
Please test it too :-)
Note: If everybody is happy with the patched
version, can somebody put the file in NB dev
tree for me as I have no CVS access and close
ccuche - can you please attach your changes in diff -u format? All
patches should be diffs, not complete copies of the file. More info:
Trung - IMHO this could easily be considered a P2 DEFECT, for anyone
actually trying to use the platform on Windows! Can this get put in
for 3.5, assuming it works as advertised?
Created attachment 9249 [details]
The diff file using the last CVS runide.cpp
Note about the last diff:
I have taken for the diff the last CVS version
of runide.cpp. If I try to run it against NB
Platform 3.4, I get the following error:
"Cannot find org/netbeans/Main class"
If I do the same using runide.cpp from NB 3.4
source, it works without problem.
Either the runide.cpp in CVS is boggus to run
with the JRE due to new additions since NB3.4,
either it works without problem but only with
new NB Plateform 3.5 source tree.
Anyways, the patch ALWAYS gives priority to
JDK over JRE, thus it doesn't break current
support for SDK. But the patch may no be
sufficient for NB3.5 (OK and tested with
Definitely the runide.exe from dev builds will not work with 3.4 Java
code, nor vice-versa. The launcher is updated in parallel with
architectural code changes - there have been significant changes in
how the launcher works between 3.4 and 3.5.
Someone needs to test the patch specifically with current (3.5)
sources, because if it is going in now, it will be for 3.5 or the dev
trunk immediately after 3.5 - 3.4 is long past.
Created attachment 9267 [details]
Works perfect with NB3.5Platform too (build NetBeansPlatform-dev-200303030100.zip). See the log file.
*** Issue 31075 has been marked as a duplicate of this issue. ***
implemented, piggybacked on the fix for issue 32053
This issue had *3 votes* before move to platform component