JAVA_HOME in leopard

edit /etc/bashrc file and add this

export M2_HOME=/Users/marek/programs/apache-maven-2.0.9
export M2=$M2_HOME/bin
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
export PATH=$M2:$JAVA_HOME:$PATH
Advertisements

2 Comments on “JAVA_HOME in leopard”

  1. Arjan says:

    Or, for a specific user rather than system wide: put it in ~/.bash_profile

  2. battiz says:

    Hi from italy! 😉
    I found this:

    “In Leopard, Apple has introduced a new mechanism for managing and maintaining your system path ($PATH).

    Previously (and in most current Linux environments) paths were managed by updating the PATH environment variable directly in either the system profile (/etc/profile) or your local profile (~/.bash_profile).

    Commonly you had entries like:

    export JAVA_HOME = /usr/lib/j2se/jdk1.5.0_13/
    export PATH=$PATH:$JAVA_HOME/bin

    In Leopard, you no longer have to modify the profile to make adjustments to system paths. Instead, you can put a simple text file containing a path entry (or entries) into /etc/paths.d/.2

    Read here:
    http://littlesquare.com/2008/01/24/upgraded-to-leopard-making-use-of-etcpathsd-and-path_helper/


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s