5

When running Ruby code on NetBeans (like when running the tests) I'm having some failures because a program is not being found. That program is installed somewhere in /opt and while for the shell I get that added to my PATH, it seems NetBeans is not getting it.

How do I specify the PATH in NetBeans?

Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622

2 Answers2

5

In Unix, in your netbeans install directory (we'll call it $NETBEANS), there's an etc directory.

$NETBEANS/etc/netbeans.conf can be changed to add things to your PATH or set other environment variables for your Netbeans instances. I set some env variable for my Glassfish launches in there, for example.

Can't say for Windows.

Will Hartung
  • 115,893
  • 19
  • 128
  • 203
  • That will get lost next time I upgrade or re-install it. Isn't it possible to define it in my user config? – Pablo Fernandez Apr 03 '10 at 04:54
  • Yes, you're correct. I imagine there is another way of setting this configuration, but I do not know how to set environment variables for a user before the X Desktop starts, or before the Mac GUI starts. For windows, I believe the PATH is global so once set, it's set everywhere after you logout and log back in. – Will Hartung Apr 03 '10 at 17:22
  • Nice. It works. It's much better then nothing or start NB all time from bash. Thanks. – vitalii May 20 '15 at 08:57
  • Important things: you should use there `export` keyword before assigning. – vitalii May 20 '15 at 09:01
2

Yes, I've had the same problem. In .netbeans IDE Top Menu click "Run" and then "Set Project Configuration". Go through the options there and you'll find what you need.

Joerg
  • 21
  • 1