Skip to main content

Posts

Showing posts with the label java

MAC OS - Install Multiple Java Versions

For those who are using MAC OS, its little tricky to install multiple Java versions. Here is the simple solution to achive this. You will need " homebrew " and some commands. To install latest Java version: Install homebrew if you do not have it already. You can find installation instructions here . Execute command: brew cask install java This will install latest Java version To install Java 7: Install homebrew if you do not have it already. You can find installation instructions here . Execute command: brew tap caskroom/versions Execute command: brew cask install java7 This will install latest Java 7 version To install Java 8: Install homebrew if you do not have it already. You can find installation instructions here . Execute command: brew tap caskroom/versions Execute command: brew cask install java8 This will install latest Java 8 version Homebrew-Cask is an extension to Homebrew. Click here to get more details. P.S. Click here to access my ot...

MAC OS - Set JAVA_HOME

While running Java applications, sometimes you may have to set JAVA_HOME environment variable. Here are the instructions to quickly set JAVA_HOME on your MAC OS. Open Terminal To Confirm if you have Java Type command: "which java" Hit Enter/Return button The command should return something like this: /usr/bin/java To get location of Java (detailed steps are documents here ) Type command: /usr/libexec/java_home Hit Enter/Return button The command should return something like this: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home To Set JAVA_HOME for single session Type command: export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home Hit Enter/Return button Type command to verify: echo $JAVA_HOME To Set JAVA_HOME permanently  Type command: vi ~/.bash_profile This will open bash_profile file Go to the end, and add following lines JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home export JA...

MAC OS - Find Java Location

Do you need to find out location of Java in your MAC? Its simple: Open Terminal Type the command: /usr/libexec/java_home Hit Enter/Return button If Java is available, then you will see results like this OUTPUT: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home Need to find specific version? Open Terminal Type the command: /usr/libexec/java_home -v 1.7 Hit Enter/Return button If Java is available, then you will see results like this OUTPUT:   /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home What happens when specified version is not available? Open Terminal Type the command: /usr/libexec/java_home -v 1.8 Hit Enter/Return button If Java is available, then you will see results like this:  OUTPUT:   Unable to find any JVMs matching version "1.8". /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home P.S. Click here to access my other posts.

Decompiler for Eclipse and MuleSoft Anypoint Studio

Decompilers are one of the most important tool for developers. Many Java developers use Eclipse IDE and many MuleSoft developers use Anypoint Studio (just another flavour of Eclipse) for their development work. We can easy configure decompiler for these IDEs. Here are the simple steps (for both IDEs): Download update site archive from here . Unzip the archive and note the location/path Open Eclipse or MuleSoft Anypoint Studio  Click on "Help" Select "Install New Software..." Click on "Add..." button On the pop-up, type name as "Java Decompiler" (or any other name) Click on "Local..." button Select the unzip location (Step 2) Click "OK" button to close the pop-up Select checkbox: Java Decompiler Eclipse Plug-in Click on "Next" Select "Yes" for the agreement Select "Finish" Restart Eclipse or MuleSoft Anypoint Studio Now, Eclipse or MuleSoft Anypoint Studio can decompile Java ....