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 20955 - Add support for JRE into .exe launcher of NetBeans
Summary: Add support for JRE into .exe launcher of NetBeans
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: _ ttran
URL:
Keywords:
: 31075 (view as bug list)
Depends on:
Blocks: 17815
  Show dependency tree
 
Reported: 2002-02-27 16:31 UTC by Petr Hrebejk
Modified: 2008-12-23 14:25 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patched CPP to run jre (41.95 KB, text/cpp)
2003-03-03 13:41 UTC, ccuche
Details
The diff file using the last CVS runide.cpp (1.35 KB, patch)
2003-03-04 08:28 UTC, ccuche
Details | Diff
Works perfect with NB3.5Platform too (build NetBeansPlatform-dev-200303030100.zip). See the log file. (2.59 KB, text/plain)
2003-03-05 07:42 UTC, ccuche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hrebejk 2002-02-27 16:31:58 UTC
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
classpath variable)
Comment 1 Jesse Glick 2002-03-17 14:54:26 UTC
AFAIK the .sh launcher supports JRE-only operation, though it is not 
convenient. It should accept a -jrehome as well as -jdkhome switch.
Comment 2 Marek Grummich 2002-07-22 09:17:55 UTC
Target milestone was changed from '3.4' to TBD.
Comment 3 Svata Dedic 2002-10-29 22:49:38 UTC
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.
Comment 4 Jesse Glick 2002-10-29 22:56:37 UTC
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.
Comment 5 mills 2002-10-30 03:32:49 UTC
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.
Comment 6 Jesse Glick 2002-10-30 04:42:08 UTC
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.
Comment 7 Jesse Glick 2003-02-14 17:47:08 UTC
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.
Comment 8 ccuche 2003-03-03 10:19:48 UTC
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!

Futher bugs:
-with "-jdkhome "C:\pathToJRE"" added to 
ide.cfg, it complains with "cannot load 
jvm.dll".
- with "-jrehome "C:\pathToJRE"", it fails 
with an "unknown option: -jrehome"

Note: every BAT scripts in "unsupported" 
directory in netbeans/bin gives even worse 
behaviors.
Comment 9 ccuche 2003-03-03 13:41:37 UTC
Created attachment 9235 [details]
Patched CPP to run jre
Comment 10 ccuche 2003-03-03 14:06:55 UTC
The previous attachement works fine on our 
test machine with a branded version of 
Netbeans Platform.
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 
the Issue...Thanks
Comment 11 Jesse Glick 2003-03-04 04:18:31 UTC
ccuche - can you please attach your changes in diff -u format? All
patches should be diffs, not complete copies of the file. More info:

http://www.netbeans.org/devhome/community/contrib-patches.html

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?
Comment 12 ccuche 2003-03-04 08:28:14 UTC
Created attachment 9249 [details]
The diff file using the last CVS runide.cpp
Comment 13 ccuche 2003-03-04 08:44:31 UTC
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 
NB3.4).
Comment 14 Jesse Glick 2003-03-04 17:48:36 UTC
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.
Comment 15 ccuche 2003-03-05 07:42:48 UTC
Created attachment 9267 [details]
Works perfect with NB3.5Platform too (build NetBeansPlatform-dev-200303030100.zip). See the log file.
Comment 16 _ ttran 2003-04-24 13:52:26 UTC
*** Issue 31075 has been marked as a duplicate of this issue. ***
Comment 17 _ ttran 2004-01-10 00:03:24 UTC
implemented, piggybacked on the fix for issue 32053
Comment 18 Quality Engineering 2008-12-23 14:25:38 UTC
This issue had *3 votes* before move to platform component