FS#60533 - [netbeans] Looking for netbeans.clusters file in wrong directory
Attached to Project:
Community Packages
Opened by Michael (lanternglow) - Monday, 22 October 2018, 15:48 GMT
Last edited by Santiago Torres (sangy) - Tuesday, 23 October 2018, 04:18 GMT
Opened by Michael (lanternglow) - Monday, 22 October 2018, 15:48 GMT
Last edited by Santiago Torres (sangy) - Tuesday, 23 October 2018, 04:18 GMT
|
Details
Description:
netbeans fails to start because it is looking for the netbeans.clusters file in //etc/netbeans.clusters but the file is actually installed to /usr/etc/netbeans.clusters Additional info: * package version(s): netbeans-9.0-1-any * config and/or log files etc. Steps to reproduce: I upgraded from netbeans-8.2-1-any and was unable to launch netbeans after that. |
This task depends upon
I could you share more information about your setup from netbeans 8.2.1. Also, could you try installing netbeans 9.0-2 from community-testing?
Here is the non-comment version of the global netbeans.conf
$ grep -v '^#' /usr/share/netbeans/etc/netbeans.conf
netbeans_default_userdir="${DEFAULT_USERDIR_ROOT}/8.2"
netbeans_default_cachedir="${DEFAULT_CACHEDIR_ROOT}/8.2"
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true"
Once I upgrade to netbeans 9.0, I find that I no longer have /usr/share/netbeans/etc/netbeans.conf.
$ ls /usr/share/netbeans/etc/netbeans.conf
ls: cannot access '/usr/share/netbeans/etc/netbeans.conf': No such file or directory
Downgrading back to 8.2 re-creates the /usr/share/netbeans/etc/netbeans.conf file.
I will try installing 9.0-2 shortly. (have to look up the instructions for adding community-testing for one package. BRB)
If you need any more specific information on the configuration of my computer, let me know.
`
bash -x $(which netbeans)
`
I believe that for some reason the new launcher isn't setting ${basedir} in all cases...
I also notice that I am missing the entire /usr/share/netbeans directory, not just the netbeans.conf file.
I also found the netbeans.conf file in /usr/lib/netbeans/etc/netbeans.conf. I am not sure if it is supposed to be in both places or not.
# find / -name netbeans.conf 2> /dev/null
/usr/lib/netbeans/etc/netbeans.conf
~/.netbeans/8.2/etc/netbeans.conf
+ PRG=/bin/netbeans
+ '[' -h /bin/netbeans ']'
++ dirname /bin/netbeans
+ progdir=/bin
++ pwd
+ old=/home/mike
+ cd /bin/..
++ pwd
+ basedir=/
+ cd /home/mike
+ case "`uname`" in
++ uname
+ DEFAULT_USERDIR_ROOT=/home/mike/.netbeans
+ DEFAULT_CACHEDIR_ROOT=/home/mike/.cache/netbeans
+ '[' -f //etc/netbeans.conf ']'
+ export DEFAULT_USERDIR_ROOT
+ userdir=
+ cachedir=
+ founduserdir=
+ foundcachedir=
+ '[' -f /etc/netbeans.conf ']'
+ '[' '!' -f //etc/netbeans.clusters ']'
+ echo Cannot read cluster file: //etc/netbeans.clusters
Cannot read cluster file: //etc/netbeans.clusters
+ exit 1
Your binary is resolving to /bin/netbeans for some reason, which ends up with this screwup. It appears they made code to follow symlinks in the binary name, but not in the parent directories.
I'm not entirely sure as to what's the best way to fix this issue on the packaging side though. One temporal solution would be to run as /usr/bin/netbeans...
And yes, running
$ /usr/bin/netbeans
works just fine.
Thanks much. I will use the workaround until I figure out how to fix my problem with the path resolution.