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 24943

Summary: Compiler error when compiling files with spaces in path (Mac OS X)
Product: java Reporter: richardbounds <richardbounds>
Component: UnsupportedAssignee: Tomas Hurka <thurka>
Status: CLOSED DUPLICATE    
Severity: blocker Keywords: SPACE_IN_PATH
Priority: P3    
Version: 3.x   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: system log (don't think this has anything useful in it)
archive of files to reproduce the bug

Description richardbounds 2002-06-19 11:06:19 UTC
If I try to compile files which have spaces in the
path, I get a javac error:

javac: invalid argument:
/Users/richard/Working_Directory/Risk_Governance/Risk
Usage: javac <options> <source files>


(Where actual path is ~/Risk_Governance/Risk\
InsightV2/ )


Obviously, a temporary work-around is to create
symlinks without spaces and use those instead.
(I'm stuck with the spaces as they're like that in
CVS)
Comment 1 Svata Dedic 2002-06-19 17:13:24 UTC
Can you paste here the exact command line that launched javac ? You
can find it in your $userdir/system/ide.log file. Just invoke compile
and then you can find the commandline near the end of file.
Thanks.
Comment 2 richardbounds 2002-06-19 19:11:45 UTC
Created attachment 6331 [details]
system log (don't think this has anything useful in it)
Comment 3 richardbounds 2002-06-19 19:13:40 UTC
Do I need to change the log level somehow? I don't think anything
useful is showing in the log...
Comment 4 Svata Dedic 2002-06-19 20:18:09 UTC
Hmm.. that is strange; did you run the compiler before you took the
log snapshot ? AFAIK all external tool executions are logged, but I
will check that once more (on the exact build).
Comment 5 Tomas Hurka 2002-07-01 11:19:03 UTC
I just tried it and it worked for me. I created directory 
"/tmp/folder with spaces" mounted this directory and there created
file HHHH.java in package com.bonk.dong. I was able to compile the
files successfully. Closing as works-for-me. If you have reproducible
test case, please reopen with the information how to reproduce it.
Comment 6 richardbounds 2002-07-01 14:54:04 UTC
Created attachment 6496 [details]
archive of files to reproduce the bug
Comment 7 richardbounds 2002-07-01 14:58:12 UTC
OK - I've messed about with it and I reckon it seems to be related to
the number/path length of the files being compiled. I've attached
test_spaces.tar.gz. The bug can be reproduced by decompressing it into
/tmp, then mounting 

/tmp/test_spaces/some\ space\ here/more\ spaces\ here/spaces/src/

as a filesystem in the explorer (in a fresh project) and adding it to
the project. Building the project should demonstrate the bug (I hope).
Sorry for the complicated instructions.
Comment 8 Tomas Hurka 2002-07-01 15:49:29 UTC
Thanks. I was able to reproduce it with your test classes.
Comment 9 Tomas Hurka 2002-07-01 16:58:45 UTC
Already reported for Windows. Closing this as duplicate.

*** This issue has been marked as a duplicate of 6427 ***
Comment 10 Quality Engineering 2003-07-01 13:11:40 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 11 Quality Engineering 2003-07-01 13:18:17 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.