0

I'm using DrJava for a simple java project and but need to set the environment variable R_HOME.

Can somebody tell me how to do this?

I can do it in the command line and test it using:

String environmentVariable = System.getenv("R_HOME");
System.out.print("Environment Variable are =>"+environmentVariable);

Which works in the command line but not in DrJava

Neil
  • 1

1 Answers1

0

If you are using MS Windows, go to Control Panel, then System, Advanced, Environment Variables, New.

You can create the variable just for your user or for system by going to the relevant panel.

The variable will be active for any new window/app you start after you created it, but not for any window/app that was already active.

Jool
  • 1,706
  • 16
  • 14
  • Thanks, I'm using Mac OSX but I eventually figured it out. If I set the variable in command line and then run DrJava from the command line it works. i.e. DrJava takes the environment variable from the command line – Neil Feb 13 '13 at 16:07