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 215931 - etc/netbeans.conf is completely ignored!
Summary: etc/netbeans.conf is completely ignored!
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 7.2
Hardware: PC Windows Vista
: P1 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-25 09:25 UTC by cschlichtherle
Modified: 2012-07-27 13:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
netbeans.conf (2.87 KB, application/octet-stream)
2012-07-25 15:20 UTC, cschlichtherle
Details
messages.log (109.27 KB, application/octet-stream)
2012-07-25 15:21 UTC, cschlichtherle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cschlichtherle 2012-07-25 09:25:19 UTC
The configuration file etc/netbeans.conf is completely ignored. I could set...

netbeans_default_options="-yabbadabbadoo"
netbeans_jdkhome="Scoobydoo!"

and it let's me get away with this, defaulting to some properties that seem to come out of thin air!

Product Version = NetBeans IDE 7.2 (Build 201207171143)
Operating System = Windows Vista version 6.0 running on x86
Java; VM; Vendor = 1.7.0_05
Runtime = Java HotSpot(TM) Client VM 23.1-b03
Comment 1 Tomas Hurka 2012-07-25 12:03:47 UTC
Can you please, explain why this issue is filed against 'Performace' category?
Comment 2 Jiri Rechtacek 2012-07-25 12:10:55 UTC
Please, attach your messages.log [*]. Thanks

[*] http://wiki.netbeans.org/FaqLogMessagesFile
Comment 3 Petr Cyhelsky 2012-07-25 12:25:21 UTC
> The configuration file etc/netbeans.conf is completely ignored. I could set...

Are you sure you are editing the right netbeans.conf file?

> netbeans_default_options="-yabbadabbadoo"

it works fine in fcs build
/space/netbeans/netbeans-7.2/bin$ ./netbeans 
Unknown option -yabbadabbadoo

> netbeans_jdkhome="Scoobydoo!"

/space/netbeans/netbeans-7.2/bin$ ./netbeans 
Cannot find java. Please use the --jdkhome switch.
 
> and it let's me get away with this, defaulting to some properties that seem to
> come out of thin air!
> 
> Product Version = NetBeans IDE 7.2 (Build 201207171143)
> Operating System = Windows Vista version 6.0 running on x86
> Java; VM; Vendor = 1.7.0_05
> Runtime = Java HotSpot(TM) Client VM 23.1-b03

it just works, please make sure that the netbeans.conf you are editing is the netbeans.conf your local copy of IDE really uses.
Comment 4 cschlichtherle 2012-07-25 15:20:48 UTC
Created attachment 122364 [details]
netbeans.conf

Here's my file

C:\Program Files\NetBeans 7.2\etc\netbeans.conf
Comment 5 cschlichtherle 2012-07-25 15:21:52 UTC
Created attachment 122365 [details]
messages.log

And that's my messages.log.
Comment 6 cschlichtherle 2012-07-25 15:22:19 UTC
You should probably test on Windows, too.
Comment 7 Libor Fischmeistr 2012-07-25 17:45:48 UTC
I have to agree with my colleagues. I tried NB 7.2 on Windows 7 and everything was ok. I tried to change all of possible options in netbeans.conf and all of them was successfully accepted. No one was ignored.

I thing there is something wrong on your side. May be there was some fault during installation. Only I can recommend you is to try to reinstall NetBeans 7.2. If your problems will endure, please report it to us - attach NB log and installation log (<homedir>\.nbi\log\).

Thank you.
Comment 8 cschlichtherle 2012-07-26 14:06:41 UTC
This is wierd: I have uninstalled NB 7.2 and verified that indeed everything gets removed. After reinstallation, etc/netbeans.conf was somehow resurrected with all my changes(!), but it still gets ignored, no matter what it contains.

What kind of magic is this?
Comment 9 Libor Fischmeistr 2012-07-27 07:38:22 UTC
Interesting. Did you remove userdir and .nbi folder in your Windows home folder?
Comment 10 Libor Fischmeistr 2012-07-27 08:22:53 UTC
The source of you problem has been found. Windows Vista has a special "feature" which causes that files in Program files seems like no edited.

In a nutshell, you've installed NB, then edited netbeans.conf. You see netbeans.conf the way you've edited it, but Vista keep somehow the original version of that file and when some app (NetBeans) asks for this file, the original version is given.

It's known problem on Windows Vista and we cannot do anything on our side to deal with it.

I can recommend you to install NetBeans to other path then to Program Files or try to find solution on some Vista forum.

NetBeans doesn't ignore netbeans.conf, but Vista gives them bad version of that file.
Comment 11 cschlichtherle 2012-07-27 10:13:56 UTC
Well, maybe. If that's the case, why does it not apply to the changes I've done to the etc/netbeans.conf for NetBeans 7.1.2?

For the next version of NetBeans, you shouldn't require users to edit this file at all because it's sits in a directory tree which should be considered immutable. Better consider it being a template and copy it to the user directory for editing.

That would also enable to have different settings for different users which is a good thing because after all the memory settings are a function of the modules installed by the user. It always felt wrong to edit them in a central installation directory.

Btw: I did remove the user dirs before reinstallation, but not the .nbi folder. I don't think it should matter though.
Comment 12 Jiri Rechtacek 2012-07-27 11:25:17 UTC
(In reply to comment #11)
> Well, maybe. If that's the case, why does it not apply to the changes I've done
> to the etc/netbeans.conf for NetBeans 7.1.2?
> 
> For the next version of NetBeans, you shouldn't require users to edit this file
Could you be more precise? What changes was required to be changed by IDE users?

> at all because it's sits in a directory tree which should be considered
> immutable. Better consider it being a template and copy it to the user
> directory for editing.
It's possible to copy netbeans.conf to <your-userdir>/etc/netbeans.conf which takes precedence over <IDE-installation>/etc/netbeans.conf

> That would also enable to have different settings for different users which is
> a good thing because after all the memory settings are a function of the
> modules installed by the user. It always felt wrong to edit them in a central
> installation directory.
Right

> Btw: I did remove the user dirs before reinstallation, but not the .nbi folder.
> I don't think it should matter though.
Comment 13 cschlichtherle 2012-07-27 13:06:45 UTC
I was referring to heap settings (-Xmx and such). I didn't know I could have a local copy of netbeans.conf - thanks.
Comment 14 cschlichtherle 2012-07-27 13:27:05 UTC
I can confirm it's an issue with Vista. When copying the central etc/netbeans.conf, the result was the original, unmodified content! When editing the file however, I could edit my modified version. This is reproducible behavior until I completely deleted the file rather than editing it. Afterwards, I could copy in the version with the changes and this time they are visible for everyone.