JDK-4615288 : Build fails under Windows due to install directory not existing
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 1.0.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2001-12-18
  • Updated: 2002-10-07
  • Resolved: 2002-10-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Description

Name: nt126004			Date: 12/18/2001


I downloaded javaws-1_0-fcs-scsl-b20-02_apr_2001.
I unzipped it and followed the instructions for doing a make installer.
If you look at line 102 of the file javaws1.0-src\build\win32\GNUmakefile,
you will see the line:
installer: all exe/setup.dll exe/uninstall.dll $(JRE)

As you can see, $(JRE) is a prerequisite for the installer. The rule for
$(JRE) begins on line 125 with:
$(INSTALL_DIR)/jre.exe: $(JRE_EXE)
(because in line 29, JRE=$(INSTALL_DIR)/jre.exe

JRE_EXE is already defined in the command line to get make going, as per
instructions, so
JRE_EXE=c:\\j2re1_3_0fcs-win.exe (or wherever the JRE is) so that
prerequisite is satisfied.

Now, the rule for $(JRE), as can be seen in line 126, copies a file into the
install-to directory:
        $(CP) -f $(JRE_EXE) $(INSTALL_DIR)/jre.exe

However, this directory, $(INSTALL_DIR), does not get created until AFTER
this attempt to copy into it, when it returns to the rule above at line 103
where there is the makedir instruction:
        $(MKDIR) -p $(INSTALL_DIR)

So, hence the makefile is attempting to copy a file into a directory before
that directory has been created, hence it fails. However, if the developer
were to run it on their machine, it would probably work because the chances
are that that directory DOES already exist. But on a clean machine, it would
not.
(Review ID: 136971) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis
31-08-2004

WORK AROUND Name: nt126004 Date: 12/18/2001 Customer Workaround : Add the line $(MKDIR) -p $(INSTALL_DIR) in the target $(INSTALL_DIR)/jre.exe: $(JRE_EXE) ======================================================================
31-08-2004

EVALUATION fix makefiles for 1.2 ###@###.### 2002-01-17 In Mantis, the $(JRE) variable will be no longer used. We no longer bundle the JRE into WebStart, now we bundle Web Start into the JRE. So this can be considered "fixed" in Mantis. ###@###.### 2002-07-23
23-07-2002