Showing posts with label Mac. Show all posts
Showing posts with label Mac. Show all posts

Friday, August 8, 2014

Simple Script to switch jdk in mac

With the Oracle FMW 12c version release, one of the normal requirement is to switch between multiple jdk versions for 12c & 11g build environments in mac. Below is a simple script which can help you to do that:

function switchjdk() {  
  if [ -z $1 ]; then
 echo "please provide with the right jdk version to switch"
  else
 echo "switching to jdk version --- $1"
 export PATH=$(echo $PATH | sed -E -e "s;:$JAVA_HOME/bin?;;" -e "s;$JAVA_HOME/bin:?;;")
 export JAVA_HOME=$(/usr/libexec/java_home -v $1)
 export PATH=$JAVA_HOME/bin:$PATH
 echo $(java -version)
  fi  
 }  
switchjdk $1

Friday, May 2, 2014

Adding components to finder toolbar

In previous versions of Mac, you can just drag & drop apps to the finder window, but with Mavericks, you also need to hold the cmd button while drag & drop.

How to open more than one instance of the app in mac

Normally you can only open one instance of the application in mac from the applications menu.. To open multiple instances here is a way to do it - either open a terminal & type open -n <The .app file path' or create a apple script which will do it for you. Make sure you save it as .app to launch it as an application.

Below is an example for a sample script i have created to launch multiple instances of soap ui.


simple hack to open unauthorized apps in mac

By default the security & privacy setting in mac would allow you open applications downloaded from appstore & identified developers. The apps that you download from web, normally they are not allowed to be opened and a simple hack to do is to press command and double click on the app. This will open a window with a warning having a open button. The other option is to change the security & privacy setting to open applications downloaded from anywhere and that could be a bit risky.




Wednesday, December 8, 2010

How to print screen in Mac

Do Apple cmd+Shift+3 and there you go the screenshot will be saved in your desktop..
cmd+Shift+4 will allow a screen selection to be captured to the clipboard