Tom Loudon
Tom Loudon

Reputation: 63

Permanently removing a JAVA_TOOL_OPTIONS environment variable

I am trying to run jake on OS X 10.6.4 but get the message Narwhal on Rhino requires Java 1.5 or higher. You have JAVA_TOOL_OPTIONS:.-Xmx512m. This is left over from a previous project where someone told me to set it to get Flash to export without dying.

I have java 1.6 installed. The JAVA_TOOL_OPTIONS seems to be the issue. I removed it using unset JAVA_TOOL_OPTIONS. This worked until I reopened Terminal. The JAVA_TOOL_OPTIONS environment variable comes back.

Any ideas on how I can permanently get rid of this?

Upvotes: 1

Views: 13783

Answers (3)

theSparky
theSparky

Reputation: 405

Or if you are on Windows:

C:\dev>java -jar helloworld.jar
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor='Sun Microsystems Inc.'
Hello World

Suppress by:

  1. Run setx JAVA_TOOL_OPTIONS ""
  2. Restart the terminal window

Result:

C:\dev>java -jar helloworld.jar
Hello World

Upvotes: 0

twistsm
twistsm

Reputation: 361

It seems like you have that variable in your environment. All you need to do is to remove it from env:

  1. Just write unset JAVA_TOOL_OPTIONS in your terminal.
  2. Set that line in the ~/.bashrc file to be sure that it will not abuse you next time you run console.

Upvotes: 3

Simon Groenewolt
Simon Groenewolt

Reputation: 10665

You probably set it in the .bashrc or .profile file in your homedirectory, remove it from there and you should be fine when you start a new terminal.

Upvotes: 4

Related Questions