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 10293 - Firststart targets should not request a working directory
Summary: Firststart targets should not request a working directory
Status: RESOLVED FIXED
Alias: None
Product: www
Classification: Unclassified
Component: Builds & Repositories (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Michal Zlamal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-14 11:50 UTC by Jesse Glick
Modified: 2002-07-19 15:23 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-03-14 11:50:04 UTC
There is no need to start the IDE with a particular working directory in effect,
as the launcher scripts know how to resolve everything relative to themselves
anyway. So the firststart targets should not pass in a working directory. For
example, the Unix version of firststart:

    <exec os="Linux SunOS Solaris" dir="netbeans/bin" executable="sh"
failonerror="yes" timeout="600000">
      <arg value="runide.sh"/>

This can be rewritten as follows:

    <exec os="Linux SunOS Solaris" executable="sh" failonerror="yes"
timeout="600000">
      <arg file="netbeans/bin/runide.sh"/>

Similar (I believe) for Windows, and for tryme target.

Note that due to an Ant bug (which I have sent a patch for and will resend),
currently if you try to run firststart from the nbbuild/netbeans/bin/ directory
(meaning same CWD as the script would set anyway), it fails terribly: the Ant
<exec> task has a bug where if you set dir="..." and it is set to the same dir
as you are currently in, on some platforms/JDKs, the CWD is set to null and
nothing works. If the setting of the CWD is removed entirely, it is OK.
Comment 1 Michal Zlamal 2001-03-14 14:07:51 UTC
You'r right, I'll fix it.
Comment 2 Michal Zlamal 2001-03-14 18:53:10 UTC
I fixed it.
Index: build.xml
===================================================================
RCS file: /cvs/nbbuild/build.xml,v
retrieving revision 1.103
diff -r1.103 build.xml
366c366
<     <exec os="Windows NT Windows 95 Windows 98 Windows 2000"
dir="netbeans/bin" executable="netbeans/bin/runide.exe" failonerror="yes"
timeout="600000">
---
>     <exec os="Windows NT Windows 95 Windows 98 Windows 2000" dir="."
executable="netbeans/bin/runide.exe" failonerror="yes" timeout="600000">
371,372c371,372
<     <exec os="Linux SunOS Solaris" dir="netbeans/bin" executable="sh"
failonerror="yes" timeout="600000">
<       <arg value="runide.sh"/>
---
>     <exec os="Linux SunOS Solaris" dir="." executable="sh" failonerror="yes"
timeout="600000">
>       <arg value="netbeans/bin/runide.sh"/>
422c422
<     <exec os="Windows NT Windows 95 Windows 98 Windows 2000"
dir="netbeans/bin" executable="netbeans/bin/runide.exe" failonerror="yes">
---
>     <exec os="Windows NT Windows 95 Windows 98 Windows 2000" dir="."
executable="netbeans/bin/runide.exe" failonerror="yes">
427,428c427,428
<     <exec os="Linux SunOS Solaris" dir="netbeans/bin" executable="sh"
failonerror="yes">
<       <arg value="runide.sh"/>
---
>     <exec os="Linux SunOS Solaris" dir="." executable="sh" failonerror="yes">
>       <arg value="netbeans/bin/runide.sh"/>
Comment 3 Michal Zlamal 2001-03-15 10:05:53 UTC
Fixed in maintrunk and release32 - previous change of version was incorrect