You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Laszlo Kishalmi <la...@gmail.com> on 2018/09/28 00:37:40 UTC

java-agent to inject system properties on NetBeans startup

Hi all,

What do you think on the idea to create a simple Java agent which can 
insert system properties into the JVM before NetBeans starts?

My motivation are the following:

 1. Sometimes you need to change some properties to debug NetBeans
    behaviour. Copy and change netbeans.conf can be clumsy. (Ok, I know
    what I'm doing and it is fine for me, but we have other users.)
 2. There can be a situation when some values needs to be computed, like
    Java 11 were messing up with font rendering on Linux and there is no
    proper default value for the antialiasing property which works on
    all platform. Also dpi awareness for HiDPI would requires some logic
    as well.

Unfortunately this won't solve the currently quiet bloated command line 
in netbeans.conf (just probably reduce it a bit.)
It would be good to be able to set the Memory and GC flags for the IDE 
as well (though memory would be sufficient)

What do you think?



Re: java-agent to inject system properties on NetBeans startup

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well, my primary intention was to somehow find a solution on the default 
value of: |awt.useSystemAAFontSettings|

Which is actually would be a workaround of a JDK 11 bug, not setting 
this value correctly on Linux (see: 
https://cwiki.apache.org/confluence/display/NETBEANS/Font+Rendering+Issues 
).

So this value shall require some initial evaluation. Also there are a 
number of properties in netbeans.conf and there is no good programmatic 
way you can alter them. Thought of having a property file and a simple 
javaagent would be enough.

However thinking this further, probably it would be good to make our 
launcher itself smarter and have a different file which can be edited 
both by hand and programmatically to provide an UI for all the Java 
parameters.
||

I feel the out of the box appearance really important, and having good 
default settings is a place we can improve. Any ideas are welcome, as 
I've just dropped mine here.

On 10/09/2018 07:08 PM, Tim Boudreau wrote:
> What problem are you trying to solve?
>
> Or, rather, what does this solve that editing netbeans,conf (by hand or
> programmatically) it a module that calls System.setProperty()?
>
> -Tim
>
> On Thu, Sep 27, 2018 at 8:37 PM Laszlo Kishalmi <la...@gmail.com>
> wrote:
>
>> Hi all,
>>
>> What do you think on the idea to create a simple Java agent which can
>> insert system properties into the JVM before NetBeans starts?
>>
>> My motivation are the following:
>>
>>   1. Sometimes you need to change some properties to debug NetBeans
>>      behaviour. Copy and change netbeans.conf can be clumsy. (Ok, I know
>>      what I'm doing and it is fine for me, but we have other users.)
>>   2. There can be a situation when some values needs to be computed, like
>>      Java 11 were messing up with font rendering on Linux and there is no
>>      proper default value for the antialiasing property which works on
>>      all platform. Also dpi awareness for HiDPI would requires some logic
>>      as well.
>>
>> Unfortunately this won't solve the currently quiet bloated command line
>> in netbeans.conf (just probably reduce it a bit.)
>> It would be good to be able to set the Memory and GC flags for the IDE
>> as well (though memory would be sufficient)
>>
>> What do you think?
>>
>>
>> --
> http://timboudreau.com
>


Re: java-agent to inject system properties on NetBeans startup

Posted by Tim Boudreau <ni...@gmail.com>.
What problem are you trying to solve?

Or, rather, what does this solve that editing netbeans,conf (by hand or
programmatically) it a module that calls System.setProperty()?

-Tim

On Thu, Sep 27, 2018 at 8:37 PM Laszlo Kishalmi <la...@gmail.com>
wrote:

> Hi all,
>
> What do you think on the idea to create a simple Java agent which can
> insert system properties into the JVM before NetBeans starts?
>
> My motivation are the following:
>
>  1. Sometimes you need to change some properties to debug NetBeans
>     behaviour. Copy and change netbeans.conf can be clumsy. (Ok, I know
>     what I'm doing and it is fine for me, but we have other users.)
>  2. There can be a situation when some values needs to be computed, like
>     Java 11 were messing up with font rendering on Linux and there is no
>     proper default value for the antialiasing property which works on
>     all platform. Also dpi awareness for HiDPI would requires some logic
>     as well.
>
> Unfortunately this won't solve the currently quiet bloated command line
> in netbeans.conf (just probably reduce it a bit.)
> It would be good to be able to set the Memory and GC flags for the IDE
> as well (though memory would be sufficient)
>
> What do you think?
>
>
> --
http://timboudreau.com

Re: java-agent to inject system properties on NetBeans startup

Posted by Piotr Hoppe <pi...@gforces.pl>.
+2


W dniu 28.09.2018 o 02:37, Laszlo Kishalmi pisze:
> Hi all,
>
> What do you think on the idea to create a simple Java agent which can 
> insert system properties into the JVM before NetBeans starts?
>
> My motivation are the following:
>
> 1. Sometimes you need to change some properties to debug NetBeans
>    behaviour. Copy and change netbeans.conf can be clumsy. (Ok, I know
>    what I'm doing and it is fine for me, but we have other users.)
> 2. There can be a situation when some values needs to be computed, like
>    Java 11 were messing up with font rendering on Linux and there is no
>    proper default value for the antialiasing property which works on
>    all platform. Also dpi awareness for HiDPI would requires some logic
>    as well.
>
> Unfortunately this won't solve the currently quiet bloated command 
> line in netbeans.conf (just probably reduce it a bit.)
> It would be good to be able to set the Memory and GC flags for the IDE 
> as well (though memory would be sufficient)
>
> What do you think?
>
>
>

-- 
Piotr Hoppe

Ta wiadomosc jest poufna i przeznaczona wylacznie dla adresata. Jesli 
jestes niezamierzonym odbiorca, to pilnie powiadom o tym nadawce. Nikomu 
nie ujawiaj tresci tej wiadomosci oraz nie uzywaj, nie kopiuj, nie 
drukuj, nie przechowuj, ani nie przekazuj dalej. Upewnij sie, ze zostala 
trwale usunieta. G-Forces Web Management Polska sp. z o.o., Ul. Trzy 
Lipy 3, 80-172 Gdańsk NIP: 583-292-04-23 REGON: 220105616 KRS: 246596

Re: java-agent to inject system properties on NetBeans startup

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well, that's only true for the Windows launcher AFAIK.

You can file an issue for that, there are a few people working on the 
Windows Launcher, they might can help this to happen.



On 10/11/2018 09:32 AM, Oliver Rettig wrote:
> Hi all,
>
> for the most frustating limitation is that in the .conf-file only
> ${HOME} are ${APPNAME} are substituted. A typical situation in a university context is that
> the size of the home-directories are limited because they are saved on a shared harddisk. In
> this case I want to switch for the nebeans platform app to an other self defined local folder
> which subfolders for each user. To do this I need the possibility to substititue other
> environment variables in the conf-file. It would be great to make this possible.
>
> best regards
> Oliver
>
>> Hi all,
>>
>> What do you think on the idea to create a simple Java agent which can
>> insert system properties into the JVM before NetBeans starts?
>>
>> My motivation are the following:
>>
>>   1. Sometimes you need to change some properties to debug NetBeans
>>      behaviour. Copy and change netbeans.conf can be clumsy. (Ok, I know
>>      what I'm doing and it is fine for me, but we have other users.)
>>   2. There can be a situation when some values needs to be computed, like
>>      Java 11 were messing up with font rendering on Linux and there is no
>>      proper default value for the antialiasing property which works on
>>      all platform. Also dpi awareness for HiDPI would requires some logic
>>      as well.
>>
>> Unfortunately this won't solve the currently quiet bloated command line
>> in netbeans.conf (just probably reduce it a bit.)
>> It would be good to be able to set the Memory and GC flags for the IDE
>> as well (though memory would be sufficient)
>>
>> What do you think?
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

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




Re: java-agent to inject system properties on NetBeans startup

Posted by Oliver Rettig <Ol...@orat.de>.
Hi all,

for the most frustating limitation is that in the .conf-file only
${HOME} are ${APPNAME} are substituted. A typical situation in a university context is that 
the size of the home-directories are limited because they are saved on a shared harddisk. In 
this case I want to switch for the nebeans platform app to an other self defined local folder 
which subfolders for each user. To do this I need the possibility to substititue other 
environment variables in the conf-file. It would be great to make this possible. 

best regards
Oliver

> Hi all,
> 
> What do you think on the idea to create a simple Java agent which can
> insert system properties into the JVM before NetBeans starts?
> 
> My motivation are the following:
> 
>  1. Sometimes you need to change some properties to debug NetBeans
>     behaviour. Copy and change netbeans.conf can be clumsy. (Ok, I know
>     what I'm doing and it is fine for me, but we have other users.)
>  2. There can be a situation when some values needs to be computed, like
>     Java 11 were messing up with font rendering on Linux and there is no
>     proper default value for the antialiasing property which works on
>     all platform. Also dpi awareness for HiDPI would requires some logic
>     as well.
> 
> Unfortunately this won't solve the currently quiet bloated command line
> in netbeans.conf (just probably reduce it a bit.)
> It would be good to be able to set the Memory and GC flags for the IDE
> as well (though memory would be sufficient)
> 
> What do you think?



Re: java-agent to inject system properties on NetBeans startup

Posted by Peter Steele <st...@gmail.com>.
+1

On Fri, 28 Sep 2018 01:37 Laszlo Kishalmi, <la...@gmail.com>
wrote:

> Hi all,
>
> What do you think on the idea to create a simple Java agent which can
> insert system properties into the JVM before NetBeans starts?
>
> My motivation are the following:
>
>  1. Sometimes you need to change some properties to debug NetBeans
>     behaviour. Copy and change netbeans.conf can be clumsy. (Ok, I know
>     what I'm doing and it is fine for me, but we have other users.)
>  2. There can be a situation when some values needs to be computed, like
>     Java 11 were messing up with font rendering on Linux and there is no
>     proper default value for the antialiasing property which works on
>     all platform. Also dpi awareness for HiDPI would requires some logic
>     as well.
>
> Unfortunately this won't solve the currently quiet bloated command line
> in netbeans.conf (just probably reduce it a bit.)
> It would be good to be able to set the Memory and GC flags for the IDE
> as well (though memory would be sufficient)
>
> What do you think?
>
>
>

Re: java-agent to inject system properties on NetBeans startup

Posted by Neil C Smith <ne...@apache.org>.
On Fri, 28 Sep 2018 at 01:37, Laszlo Kishalmi <la...@gmail.com> wrote:
> What do you think on the idea to create a simple Java agent which can
> insert system properties into the JVM before NetBeans starts?

-1

I understand the requirement, but not sure that's a better approach
than providing a UI for editing the user-land .conf file?

eg. http://wiki.netbeans.org/FaqNetbeansConf (that page doesn't seem
to have been migrated)

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

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