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.
On a fresh userdir when starting up NB with a com.glassfish.v3.installRoot pointing to a glassfish v3xxx installation where the installRoot contains whitespace, creation of a domain will fail. If the user has write permission on the installRoot, a pre-existing domain1 will be used, no new domains can be created, though. If the user does not have write permission in installRoot, the glassfish.common module will try to create a personal domain and fail. This happens even with proper quoting of the installRoot property.
The root-cause seems to be a limitation of Runtime.exec. That call properly quotes all arguments passed in an array of Strings ... except for the first, i. e. the executable to run. And I cannot seem to be able to do that manually, either. A workaround is to not call the asadmin script, but java, thus moving the whitespace in installRoot from the first to a subsequent element of the array passed to Runtime.exec. This would still break on a --jdkhome with whitespace included, but I think that would break other things, too.
Created attachment 82792 [details] SSCCE
Created attachment 82793 [details] suggested fix
Thanks for the patch. I don't think this will be 'in' for 6.7, but we should be able to include it in 6.8 very soon.
Or we could put it into NetBeans 6.7 after RC1 before RC2, if this is seen as important.
true... I have been a little too focused on getting rc1 finished. I had forgotten that we would have an rc2!
Integrated into 'main-golden', will be available in build *200906040201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/cf273d2366ed User: Vince Kraemer <vkraemer@netbeans.org> Log: #166025: asadmin has space in path issues when triggered via Runtime.exec(String[])
in main-golden