Where to install Netbeans

16,529

Solution 1

You don't need to run the installer using sudo and you don't need to install it in a system folder, such as /usr/local/. Just run the installer normally and choose to install it in your home directory. If you don't want the netbeans and glassfish folders cluttering up your home folder, you can install them in a sub-folder in your home folder, such as local or Library or whatever.

You will be able to run Netbeans by clicking on the launcher it creates. However, if you want to run it from the command line at all, you will need to add the Netbeans' bin folder to the system path. You can do this by opening your .bashrc file in a text editor and adding this line at the bottom (modified according to where you installed Netbeans):

export PATH=$PATH:~/netbeans-7.2.1/bin

Solution 2

If you are going to be the only user on the machine running NetBeans you should not run installer as a root user.

 $ chmod u+x ~/Downloads/netbeans-7.3rc1-linux.sh
 $  ~/Downloads/netbeans-7.3rc1-linux.sh

You will be prompted to select installation directory defaulting to the user home. Selected installation folder must be writeable by acting user.

For details check NetBeans Community Wiki.

If you are going to have multiple users launching NetBeans from the same installation then you should run installer as root user and select /user/local as installation directory. It should be default choice when prompted.

The NetBeans IDE is engineered to take in account multiple users launching the IDE from the same installation:

NetBeans accommodates this by keeping each user’s personal settings separate from the NetBeans code installation.

On Unix systems, settings are kept in a local settings directory created in the user’s home directory the first time NetBeans is run.

Above quote is from NetBeans: The Definitive Guide.

Share:
16,529

Related videos on Youtube

Korrigan Nagirrok
Author by

Korrigan Nagirrok

Updated on September 18, 2022

Comments

  • Korrigan Nagirrok
    Korrigan Nagirrok over 1 year

    I'm planning on installing Netbeans 7.2.1 on my Ubuntu 12.10. So far I've already installed JDK 7u11 without any problems and already downloaded Netbeans from Oracle site.

    My question is this: Where should I install Netbeans? Should I accept the default /usr/local/netbeans-7.2.1 or should I change this path to my /home?

    I'm questioning because someone told me not to install it in the default proposed installation path because later on I’ll be more than likely to run into permissions problems down the line. Working with Netbeans I would not have permissions to write in that folder thus disabling me from adding Libraries to my projects, installing and uninstalling plugins to the IDE, and even with Glassfish server configuration.

    I've googled in order to cast a light on my doubts to no avail. The only thing I found was this thread at Netbeans forum which brought even some more doubts.

    Can anyone help me?

  • Korrigan Nagirrok
    Korrigan Nagirrok over 11 years
    Thank you for prompt answer. I'm aware of the fact that one should always install software from the software center, the problem is that the version of Netbeans available at the Software Center is quite outdated, it's still Netbeans 7.0 which comes without a series of features
  • Korrigan Nagirrok
    Korrigan Nagirrok over 11 years
    Thank you for your enlightenment. Just one more question, if you please, before considering this answer as helpful and correct. When you refer to add my Netbeans' bin folder to my system path, by editing .bashrc file, what file is this? Is this a file from my system or a file existing in one of Netbeans installation folders?
  • iBelieve
    iBelieve over 11 years
    It's a file found in your home folder (it will be hidden by default - press Ctrl+H to view hidden folders and files) that sets up the environment variables and the terminal.
  • sierrasdetandil
    sierrasdetandil over 11 years
    While I agree with this answer, there might be a downside to the practice of installing software in the user's home: backups (it depends on your backup habits.) If you install software in your home and you do backups of the entire home, then you should remember to exclude the installation directory from the backups; there's no point in backing up something that can be recovered by just reinstalling, if the settings or variable files are stored elsewhere. Netbeans can be installed in /usr/local or /opt and there won't be problems with permissions, as the settings will be in your home.
  • Goran Miskovic
    Goran Miskovic over 11 years
    I am afraid that if installed in /usr/local or opt you might need to run IDE as root on updates.
  • sierrasdetandil
    sierrasdetandil over 11 years
    There's no need to run the IDE as root, even if it's installed in a system directory. The plugins are stored in $HOME/.netbeans, so they can be installed and updated as a regular user. Only to update the IDE itself there will be need of root access, to run the new installer.
  • Goran Miskovic
    Goran Miskovic over 11 years
    Only user installed plugins will go to $HOME/.netbeans. All other plugins will be installed under installation directory. Therefore whenever any of default plugins needs to be updated you will have to run the IDE as a root. Don't forget that for minor releases you will be able to update the IDE using update manager.
  • sierrasdetandil
    sierrasdetandil over 11 years
    I think Netbeans copies even the default plugins into .netbeans when they're activated, in $HOME/.netbeans/*/modules/. In several years using it I've always updated all plugins as a regular user. But you're right, to do a complete minor update of the installation you'll have to run it as root. My point is that it's up to the user to choose to install it as regular user or as root; both methods work well.