This post is for all those who are new to mac osx and people who are on the process of setting up their mac osx to run WSO2 middleware applications. This article will set your mac osx for long time perspective of your wso2 product usage and development perspective.
Things you need:-
apache-ant-1.9.4
Things you need:-
apache-ant-1.9.4
Note:- At the moment article was written for development purposes engineers at wso2 use Java 1.6 for their development therefore Im going to use Java 1.6 v65. In case if wso2 upgrade to Java 1.7 which will happen sooner or later keep the necessary setups done so, it will be so easy to move on with Java 7.
Now you have downloaded the apache ant, maven and 2 versions of jdk. For ease of use create a folder in place you prefer may be in the documents folder or downloads directory and move the downloaded 4 files. In this case I prefer to use Macintosh HD/<yourFolderName>/<copyFilesHere> In this way it will be so easy to find and travel through the environmental content. Now install the jdk, for that you should have to follow the steps which is pretty easy.
After installing these jdk's using default file locations you can find them at /Library/Java/JavaVirtualMachines/
If you customise the java path make sure remind the java home location. But author prefer the same directory that we created in the Macintosh HD root.
If you chose the default jdk path two Java homes will look like this :-
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home
Let's setup the environment variables.
There are several ways that you can create a environment variables in this article Im going to use .bash_profile and .profile approach. You have to crate 1 of these 2 files to setup environment variables, both files should be structured in same manner and you can only create only single file for this therefore both the .bash_profile and .profile could not exist. since Im familiar with nano command Im going to use it, but you can use vi or a simple text editor to edit this file. Since this file is hidden, to view it kindly read authors previous article.
Thusharas-MacBook-Pro:~ thushara$ nano .profile
# export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home
export JAVA_HOME=/Library/Java/JavaVirtualMachines/1.6.0_65-b14-462.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH
export ANT_HOME=/<yourFolderName>/apache-ant-1.9.4
export PATH=$ANT_HOME/bin:$PATH
export M2_HOME=/<yourFolderName>/apache-maven-3.0.5
export PATH=$M2_HOME/bin:$PATH
export MAVEN_OPTS="-Xms768m -Xmx3072m -XX:MaxPermSize=1200m"
# is used for comment the line and export is a command that set the environment variables.
press control+O to save the changes and control+X to exit the editor.
Now run Thusharas-MacBook-Pro:~ thushara$ source .profile in the current terminal window to active the new environment variables, Else you need to restart the mac osx for this.
like wise same steps will be followed if you create a .bash_profile.
Kindly add your comments and feedbacks below.
Kindly add your comments and feedbacks below.
Comments
Post a Comment