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 160234 - Cannot make new project on desktop
Summary: Cannot make new project on desktop
Status: CLOSED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P3 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2009-03-13 02:06 UTC by zian
Modified: 2011-06-09 09:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Process Monitor log (721.32 KB, application/octet-stream)
2009-03-13 02:07 UTC, zian
Details
Messages file (25.75 KB, text/plain)
2009-03-18 21:14 UTC, zian
Details
NetBeans log file (25.75 KB, text/plain)
2009-03-20 17:17 UTC, zian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zian 2009-03-13 02:06:35 UTC
When I try to make a new Java application project at C:\Users\Zian\Desktop, I get a "Project Folder cannot be 
created." message.

I've already tried running SubinACL to reset the security privileges on it.

I've attached a log from Process Monitor showing only the events from NetBeans that did not succeed.
Comment 1 zian 2009-03-13 02:07:31 UTC
Created attachment 78139 [details]
Process Monitor log
Comment 2 Martin Schovanek 2009-03-18 18:43:52 UTC
Can you please attach IDE log?
Comment 3 zian 2009-03-18 21:14:56 UTC
Created attachment 78409 [details]
Messages file
Comment 4 Martin Schovanek 2009-03-19 15:17:24 UTC
I do not see a issue in the log, can you please attach IDE log after you reproduce the problem and got the "Project
Folder cannot be  created." message?

Next can you create a new folder on your desktop?
Comment 5 zian 2009-03-20 17:16:52 UTC
I quite certain that I attached the log after reproducing the issue. But, just in case, I've tried again.

Yes, using Windows Explorer.
Comment 6 zian 2009-03-20 17:17:43 UTC
Created attachment 78534 [details]
NetBeans log file
Comment 7 Michael Nazarov 2009-03-23 16:51:01 UTC
Unable to find any problems within log file. Assign to more appropriate category.
Comment 8 ecastro 2009-05-04 22:55:46 UTC
The problem is specific to Windows.

Explorer.exe tends to set folders read-only when they have a special icon.
Strangely, read-only folders can be written files in.
NetBeans misinterprets what ReadOnly means on Windows and disallow folder creation.

To reproduce:
Create folder C:\FOLDER
Set it read only using "attrib +R C:\FOLDER"
Test that you can write into this read only folder (with any kind of tool)
Test that you cannot create a NB Java project using this folder as 'Project Location'
Set back this not so read-only folder to normal using "attrib -R C:\FOLDER"
You now can create the project.

I think the problem can now be fixed.
Comment 9 zian 2009-05-07 10:41:29 UTC
I can confirm that this works. There is a trick though. Unlike most DOS commands, one cannot simply type "attrib -r" 
to change the current directory. Instead, one must enter "attrib -r [folder name]".
Comment 10 Jan Jancura 2009-09-21 14:00:00 UTC
>filesystems
Comment 11 Jiri Skrivanek 2009-09-21 14:27:20 UTC
It is because java.io.File.canWrite() returns false for Desktop and other folders which "pretend" to be read-only on
Windows. It is already fixed in upcoming JDK 7.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4939819
Comment 12 Marian Mirilovic 2011-06-09 09:57:13 UTC
v/c