Pregunta

I want to set PENTAHO_JAVA_HOME variable on MAC OS.How can I do this. I am not familiar with MAC OS.

I followed following on windows :

  1. From the Start menu, right-click Computer, then select Properties from context menu.

  2. Click Advanced System Settings. The System Properties window appears.

  3. In the System Properties window, click the Advanced tab, then click Environment Variables.

  4. To set the PENTAHO_JAVA_HOME variable do this.

a) In the System Variable section, click New. b) In the window that appears, type PENTAHO_JAVA_HOME in the name field. c) In the value field, enter the directory where your Oracle JDK or Oracle JRE is stored.

For example your Java JRE is in the Program Files\Java\jre7 directory, type this. C:\Program Files\Java\jre7 d) Click OK.

  1. Click Apply Changes.
¿Fue útil?

Solución

To set environment variable temporary, you need to open terminal and execute in the command line:

export PENTAHO_JAVA_HOME=/some/path/where/java/located

If you need it persistent, you can add above line at the end of your shell configuration file. Usually, shell config file is named: ~/.profile, ~/.bashrc

So, look for any of files above. If no files, create ~/.profile file:

touch ~/.profile

and place the command line above into it (using any text editor you prefer most).

Re-login/re-boot might be necessary.

To check if you have the variabled successfully set, you can execure such command in the terminal:

echo $PENTAHO_JAVA_HOME

It will show value of the variable.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top