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 57755 - cannot find java.exe
Summary: cannot find java.exe
Alias: None
Product: installer
Classification: Unclassified
Component: Tools bundle (show other bugs)
Version: 4.x
Hardware: All Windows ME/2000
: P3 blocker (vote)
Assignee: mslama
Keywords: RELNOTE
Depends on:
Reported: 2005-04-11 23:37 UTC by lholcombe
Modified: 2005-09-05 10:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description lholcombe 2005-04-11 23:37:45 UTC
I downloaded and installed the NetBeans 3.4 ide but when I initially launched  
it I got the error "Cannot find java.exe"  
So I hit <Start><Run> typed "cmd" and pressed enter.  Then from the command  
line I typed "java" and hit enter.  Java ran and gave me a screen full of  
parameter information.  
So I rechecked my path in "Environment Variables" and satisfied myself that it  
points to "E:\Program Files\Java\jre1.5.0_02\bin"; (which is where java is  
installed).  Then I rebooted, because it's windows.  Then I logged in and  
double-clicked on the desktop icon and got the same error.  Next I tried from  
the <Start><Programs> menu option and got the same error.  
I tried to UNINSTALL netbeans from "Add/Remove Programs" by I get the error "A 
suitable JVM could not be found."  So I nearly gave up. 
Then I remembered that I have LimeWire installed so I clicked on that icon and 
LimeWire started up.  Then I went to and I got the message 
"You've got the latest!" 
Now I give up.  What crazy mechanism does Netbeans 4.0 use to detect the 
location of java.exe?
Comment 1 lholcombe 2005-04-11 23:38:55 UTC
Uh ... that's Netbeans 4.0.  I must have lost my mind! 
Comment 2 Jan Chalupa 2005-04-12 06:59:14 UTC
First, if you really installed NB 4.0 (and not 3.4) using the installer, open
the following file:


and check the value of the netbeans_jdkhome property in that file. Let us know,
what you find there.

Secondly, NetBeans needs a full JDK to run, not just JRE. Therefore, it won't
run with the JRE located in your E:\Program Files\Java\jre1.5.0_02\bin
directory. However, this shouldn't matter, because NB doesn't look for Java in
your PATH.
Comment 3 mslama 2005-04-12 07:03:35 UTC
IDE requires JDK so the same does installer. JRE is not enough. (Even if
installer can run on JRE.) Unfortunately JVM resolution is performed by Install
Shield native launcher - we cannot modify it to provide better error message. I
add keyword RELNOTE to emphasize this in Release Notes but I am afraid not many
people read it.
Comment 4 Jan Chalupa 2005-04-12 07:11:12 UTC
Huh, it was my understanding that the user managed to install NetBeans first,
but then was unable to launch it. This would mean that the IS was able to find a
suitable JVM and something must have gotten broken afterwards. That's why I'm
interested in the netbeans_jdkhome property of netbeans.conf.
Comment 5 mslama 2005-04-12 07:44:47 UTC
Yes in this issue: 1.User cannot start IDE. 2.User cannot uninstall IDE. If the
same configuration would be kept user also cannot install IDE. But this is more
often that user either complains on mailing list or files issue to IZ that he
cannot install IDE when he has only JRE installed. You can reassign this issue
to launcher if you think error message when IDE is started can be improved.

Comment 6 lholcombe 2005-04-12 10:25:23 UTC
The contents of {nb-install}\etc\netbeans.conf are: 
# ${HOME} will be replaced by JVM user.home system property 
# options used by netbeans launcher by default, can be overridden by explicit 
# command line switches 
netbeans_default_options="-J-Xms32m -J-Xmx128m -J-Xverify:none" 
# default location of J2SE JDK, can be overridden by using --jdkhome <dir> 
netbeans_jdkhome="E:\Program Files\Java\jdk1.5.0_02" 
# clusters' paths separated by path.separator (semicolon on Windows, colon on 
After my initial failures to install the product, I downloaded and installed 
the netbeans/jdk bundle, jdk-1_5_0_02-nb-4_0-ml-win.exe, but still get the 
same error "Cannot find java.exe."  It turns out that "E:\Program 
Files\Java\jdk1.5.0_02" is an empty folder after that was installed. 
Thanks for your interest 
Comment 7 mslama 2005-04-12 11:31:33 UTC
It looks like jdkbundle installer fails to install JDK. Workaround: Try to
install JDK using JDK installer jdk-1_5_0_02-windows-i586-p-04_mar_2005.exe.
Then install NB 4.0 using NB 4.0 installer.
Comment 8 mslama 2005-04-12 11:35:02 UTC
Or if you keep location for JDK ie. "E:\Program Files\Java\jdk1.5.0_02" you can
omitt reinstallation of NB IDE. Or you can manualy edit file netbeans.conf and
fix netbeans_jdkhome. You can also use command line parameter --jdk_home <Path
to JDK> when you start IDE from command line. (Good if you have more JDK
versions installed.)
Comment 9 mslama 2005-04-14 10:42:55 UTC
jdkbundle installer may fail to install JDK due to insufficient free space on
system disk. (Even if you install NB/JDK elsewhere there is still free space
required on system disk for JDK files and for temporary files during
installation. It is roughly 400-500MB on system disk. What is free space on
system disk at your machine? Workaround is to install JDK/NB separately. You can
also use command line  option -is:tempdir <path to existing dir> It will
redirect temporary area used by installer to another location.
Comment 10 mslama 2005-04-18 14:16:15 UTC