Thursday, June 24, 2010

Set JAVA_HOME / PATH

for single user

Login to your account and open .bash_profile file
$ vi ~/.bash_profile

Set JAVA_HOME as follows using syntax export JAVA_HOME=. If your path is set to /usr/java/jdk1.5.0_07/bin/java, set it as follows:
export JAVA_HOME=/usr/java/jdk1.5.0_07/bin/java

Set PATH as follows:
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin

Save and close the file. Just logout and login back to see new changes:
$ echo $JAVA_HOME
$ echo $PATH

Tip: Use the following command to find out exact path to which java executable under UNIX / Linux:
$ which java

Please note that the file ~/.bashrc is similar, with the exception that ~/.bash_profile runs only for Bash login shells and .bashrc runs for every new Bash shell.

Set JAVA_HOME / PATH for all user

You need to setup global config in /etc/profile OR /etc/bash.bashrc file for all users:
# vi /etc/profile

Next setup PATH / JAVA_PATH variables as follows:
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin
export PATH=$PATH:/usr/java/jdk1.5.0_07/bin

Saturday, June 12, 2010

Install Spring IDE for Eclipse 3.4


Installing Spring IDE on Eclipse 3.4 (RC1) was not quite as straight forward as I thought it would have been, so here are a few more details on how to do it.
  1. Help->Software Update
  2. Click Available Software tab
  3. Click Add Site
  4. Enter http://springide.org/updatesite
  5. Click checkbox next to http://springide.org/updatesite to expand.
  6. Click checkbox to uncheck, then click again to check parent and children [Eclipse bug 232112].
  7. Click Install
  8. Software validity warning message will come up - click Yes
  9. Resolving dependencies will moan with:
    (Spring IDE Bean Support (required),Spring IDE Dependencies (only for Eclipse 3.2.x),Spring IDE OSGi Extension (optional),Spring IDE Web Flow Extension (optional),Spring IDE Security Extension (optional),Spring IDE AOP Extension (optional),Spring IDE JavaConfig Extension (optional),Spring IDE Autowire Extension (optional),Spring IDE Mylyn Integration,Spring IDE AJDT Integration (optional),Spring IDE Security Extension Developer Resources,Spring IDE Autowire Extension Developer Resources,Spring IDE AOP Developer Resources,Spring IDE OSGi Extension Developer Resources,Spring IDE Webflow Developer Resources,Spring IDE Mylyn Integration Sources,Spring IDE JavaConfig Developer Resources,Spring IDE Sources,Spring IDE AOP Developer Resources) will be ignored.
  10. Uncheck Spring IDE Dependencies (only for Eclipse 3.2.x)
  11. Screen will re-calculate successfully and the Finish button will appear, click it