DawidLokiec opened a new issue, #6707:
URL: https://github.com/apache/netbeans/issues/6707

   ### Description
   
   **Issue Description:**
   I have a Maven- and NetBeans-Platform-based Java Desktop App Project. 
Currently, the application utilizes a configuration file located in the 
installation directory (`etc/<appname>.conf`) to set important Java runtime 
parameters using the `default_options` option. However, I would like to provide 
users with the ability to set additional Java runtime parameters, such as the 
scaling option `sun.java2d.uiScale`.
   
   The challenge is that users might not have write access to the installation 
directory where the `etc/<appname>.conf` file is located. I've discovered that 
it's possible to place a similar configuration file in the NetBeans user 
directory (`<NetBeans-User-Directory>/etc/<appname>.conf`), where users have 
write permissions.
   
   My dilemma is that the default options specified in the default_options of 
the installation directory's` etc/<appname>.conf` file need to be retained for 
backward compatibility. Additionally, I'd like to append user-specific options 
from the <`NetBeans-User-Directory>/etc/<appname>.conf` file to the 
default_options.
   
   I am uncertain about the best approach to achieve this, and **I am concerned 
that if I use the user directory configuration file, the NetBeans Platform 
might no longer consider the installation directory's configuration.**
   
   **Proposed Solution:**
   I propose enhancing the NetBeans Platform to support a mechanism for 
user-specific configuration that can work in conjunction with the installation 
directory's configuration.
   
   1. **Support User Directory Configuration:**
   
   - Allow the NetBeans Platform to recognize and use configuration files 
located in the NetBeans user directory 
(`<NetBeans-User-Directory>/etc/<appname>.conf`).
   
   - Ensure that user-specific configurations are appended to the default 
options defined in the installation directory's configuration.
   
   2. **Preserve Backward Compatibility:**
   
   - Retain the ability to use the installation directory's configuration 
(`etc/<appname>.conf`) for specifying default options.
   - Ensure that existing installations with configuration in the installation 
directory continue to work as expected.
   
   3. **Documentation:**
   
   - Update documentation to clearly explain the new user-specific 
configuration mechanism and how it interacts with the installation directory's 
configuration.
   
   **Epected Behavior:**
   Upon implementing this enhancement, users should be able to set additional 
options in the <`NetBeans-User-Directory>/etc/<appname>.conf` file, and these 
options should be appended to the default_options specified in the installation 
directory's etc/<appname>.conf. The NetBeans Platform should seamlessly use 
both configurations for the application runtime
   
   ### Use case/motivation
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to