This is a bug in the default NetBeans platform app launcher script (which is found in the NetBeans sources at netbeans/harness/apisupport.harness/release/launchers/app.sh , and automatically copied into the "bin" directory when you build your platform app). Note that this script is used on Linux and on MacOS, but not on Windows. There is no corresponding problem on Windows.
In my own platform app, I fixed the bug with the patch below. I should probably open a Pull Request to fix the original template... -- Eirik =================================== diff --git a/ app.sh b/ app.sh index 679ed16..7a291bc 100755 --- a/Other/app.sh +++ b/Other/app.sh @@ -79,6 +79,8 @@ while [ $# -gt 0 ] ; do shift done +cachedir="${default_cachedir}" + if [ -f "${userdir}/etc/$APPNAME".conf ] ; then . "${userdir}/etc/$APPNAME".conf fi @@ -127,6 +129,7 @@ case "`uname`" in '"-J-Xdock:icon=$progdir/../../$APPNAME.icns"' \ --clusters '"$clusters"' \ --userdir '"${userdir}"' \ + --cachedir '"${cachedir}"' \ ${default_options} \ "$args" ;; @@ -141,6 +144,7 @@ case "`uname`" in --jdkhome '"$jdkhome"' \ --clusters '"$clusters"' \ --userdir '"${userdir}"' \ + --cachedir '"${cachedir}"' \ ${default_options} \ "$args" exit 1 =================================== -----Original Message----- From: Patrik Karlström <pat...@trixon.se> Sent: Saturday, May 23, 2020 4:16 AM To: dev@netbeans.apache.org Subject: DEFAULT_CACHEDIR_ROOT not propagating to platform application The following is done with NB Platform 11.3 and Java 11 on Kubuntu 20.04. While I was about to use the cache dir logic provided by the platform I ran into this problem. My cache dir is in ${HOME}/.${APPNAME}/var/cache and not as expected, ${HOME}/.cache/${APPNAME} The app.conf contains default_userdir="${DEFAULT_USERDIR_ROOT}/dev" default_cachedir="${DEFAULT_CACHEDIR_ROOT}/dev" Did some echoing in the bin/appname and DEFAULT_CACHEDIR_ROOT was set ok, but not picked up by the application. When specifying --cachedir it gets picked up by the application. I created a simple testapp and this problem is there too. So I guess the question is, Is this related to my doing or the platform? /Patrik