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 28663 - bin/ not found correctly
Summary: bin/ not found correctly
Alias: None
Product: obsolete
Classification: Unclassified
Component: cpp (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: _ gordonp
Keywords: ARCH
Depends on: 28683
Blocks: 27151
  Show dependency tree
Reported: 2002-11-11 22:33 UTC by Jesse Glick
Modified: 2003-07-10 18:50 UTC (History)
0 users

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 Jesse Glick 2002-11-11 22:33:14 UTC only searches
${netbeans.home} for it. This is already a
possible bug - cpp.nbm might be installed in the
user dir - and issue #27151 would also require
entries in ${netbeans.dirs} to be searched. Better
to simply delete and implement its
functionality in Java code to begin with, by
getting the output and error streams from the
Process and forwarding them to standard output (or
an InputOutput etc.), each in its own thread. Not
a difficult thing to do.
Comment 1 Jesse Glick 2002-11-11 22:34:08 UTC
BTW simply to solve the #27151 side would look like this:

 	if (Utilities.isUnix()) {
 	    commandInterpreter =
 			System.getProperty("netbeans.home") + "/bin/"; // NOI18N
+            if (!new File(commandInterpreter).isFile()) {
+                String nbdirs = System.getProperty("netbeans.dirs");
+                if (nbdirs != null) {
+                    StringTokenizer tok = new StringTokenizer(nbdirs,
+                    while (tok.hasMoreTokens()) {
+                        File f = new File(new File(tok.nextToken(),
"bin"), ""); // NOI18N
+                        if (f.isFile()) {
+                            commandInterpreter = f.getAbsolutePath();
+                            break;
+                        }
+                    }
+                }
+            }
 	    commandLine = getMakeCommand() + line;
 	} else {
 	    // I am NOT a windows programmer and the following is very
unlikely to work.
Comment 2 Jesse Glick 2002-11-11 22:35:29 UTC
Finally, please consider deleting the (apparently unused) key "NBDIR"
from CCFSrcLoader.CCFFormat, as its value can be considered close to
meaningless if you do not know where cpp.nbm was installed.
Comment 3 Jesse Glick 2002-11-12 18:07:41 UTC
Issue #28683 suggests a more general solution (needed only if cannot just be removed).
Comment 4 _ gordonp 2003-07-10 17:38:15 UTC
The lookup for now uses InstalledFileLocator.
Comment 5 Jesse Glick 2003-07-10 18:50:42 UTC
In the release35 branch? Please double-check the target milestone.