Question

I'd like to run Netbeans from the launcher and get it to see environment variables.

Background: I'm using netbeans for a rails project and have configured my devel database with configurations using environment variables. Unfortunately Netbeans appears unable to read those variables even when I list them in /etc/profile (for all users).

I can explicitly run Netbeans from the terminal: /Applications/NetBeans/NetBeans\ 7.3.1.app/Contents/MacOS/netbeans and that gets things to work but I'd much rather run it from the launcher if I can solve this problem.

Was it helpful?

Solution

You could define them in

/etc/launchd.conf

and restart system. See this for example

OTHER TIPS

If you run NetBeans from the command line, e.g.

open 
 /Applications/NetBeans/NetBeans 8.1.app/Contents/Resources/NetBeans/bin/netbeans

then the environment variables defined in the shell initialization script will be visible in the NetBeans application. If you start NetBeans via the icon, the initialization scripts are not run.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top