Skip to main content

NetBeans 6.5 still coughs on spaces

Posted by joconner on February 17, 2009 at 11:42 PM PST

I've been trying to slowly introduce NetBeans to my colleagues for over a year. I think they'd actually use it in our current products and projects, but NetBeans won't make it easy for us. How's that you ask?

It turns out that we have several projects named with spaces. For example, one project is Tag Server, and another is Agent Registry. Why spaces? Well, the original project was developed using Eclipse, and one told the team that they shouldn't use spaces. So they did, Eclipse doesn't mind, and.... that's the current situation.

I was really encouraged when I found out that NetBeans 6.5 has an Eclipse project importer. It slurped in our Eclipse workspace and projects in what appeared to be just an easy, casual task. It looked fine at first glance. I beamed with pride. My NetBeans was doing so well.

My smile didn't last long. NetBeans soon began to sputter, gag, and choke. The problem is that NetBeans has had a long-standing problem with path and project names that contain spaces. NetBeans coughed up on the project when trying to compile and run it. It complained that my problem "might be because your user directory is on a Windows UNC path (issue #46813)." I don't have a UNC path in this project; everything looks like very old-school paths. It's all on my D:\workspace\... subdirectory. OK, yes, there are some spaces in those subdirectories. But spaces in file and directory names aren't really special anymore.

Ugh. NetBeans is so close to being perfect in so many ways. Unfortunately, despite the fact that it could be my team's IDE for most reasons, it cannot be our IDE for one reason. So why don't we just change our paths and remove the spaces. One reason is that we have dozens of ANT scripts that work with these directories, and we're on a short timeline ALL of the time. We just don't have time to mess with it if it doesn't work. So, NetBeans doesn't get any traction here.

So, despite the fact that bug id#46813 is supposedly fixed in NB 6.5, something still apparently haunts the product when spaces are involved. Sigh...maybe I'll try again another day.

Related Topics >>


> So why don't we just change our paths and remove the spaces You could try the short path name (no spaces). You can get it by running the command dir /X in the parent directory

From another reader, I received this information: "NB will not gag if you create a new project from scratch (which includes spaces in the path and/or project name). This problem is isolated with the Eclipse project importer. Although this is not an ideal way to migrate an existing Eclipse project you do get the guarantee that NB will not gag when the project name and/or path contains spaces."

I avoid using spaces in project names for the reason told above. But in a couple of cases I got it wrong and introduced a space in two projects (RCP modules). They stayed for a couple of weeks, when I noted them and renamed. But I didn't see any problems during those two weeks, so I'm surprised of hearing about this bug.

After reading this post I created a test eclipse workspace like "D:\My Test Workspace" and Created a Project named "Test Project" both the names have spaces. I then imported this eclipse workspace project into NetBeans. This project worked fine in my NetBeans IDE 6.5 installation. . My Configuration is: Product Version: NetBeans IDE 6.5 (Build 200811100001) Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\tusharj\.netbeans\6.5 . Note that my user directory also has spaces in it. Even my project directory since many days has spaces as it is "D:\Tushar Joshi\My Documents\NetBeansProjects" . I need more information about this issue so that I can reproduce this. I must be missing something major. My observation says that this is not an issue for simple configurations as I did, the above mentioned project settings must be more complicated than my test cases. I tried one Java project and one Dynamic Web Project with Tomcat 6.0 Server Configuration and both worked in my NetBeans IDE 6.5 installation on Windows XP. . . with regards Tushar . ============================================== Tushar Joshi, Nagpur

*nix systems have long permitted spaces in file/directory names even if such usage is uncommon. It is notable that in Vista the new 'standard' paths don't have spaces (e.g. ProgramData)

Netbeans is open source. This is supposedly the strength of open source, that somebody will fiddle with the source and fix bugs like this. I'm not sure how open Sun is to accepting outside contributions, but I image anybody determined to fix the bug and provide a test case could probably convince Sun to accept that patch.

windows is the world standard operational system .. doesn't matter if we like it or not.. so, any tool supposed to be adopted in this planet should be compliant with the minimum windows standards, even the dumb ones like blank spaces in path names.. :( no excuses, Netbeans team should fix that in order to be able to compete with eclipse ..

I didn't hit this problem because I abhor spaces in filenames or directories, even as a Windows user, so I can use NetBeans without issues, in fact I didn't even know of that problem. But since Microsoft started to push such names with standard folders like "Program Files" in Win95 (most retarded decision ever - just to f*ck with CLI users), any half-decent test procedure for Windows software (or portable software that runs on Windows) must use these paths, for both the program installation and its user files. There's just no excuse for this kind of bug, almost 15 years after Win95.