Showing posts with label web_app. Show all posts
Showing posts with label web_app. Show all posts

Eclipse Installation in Ubuntu

  1. Open a terminal (Ctrl-Alt-T) and switch it to root permissions by entering:
    $ sudo su
  2. Make sure Eclipse Indigo is NOT installed in your Ubuntu. You may need to remove both "eclipse" and "eclipse-platform" packages to get rid of it. If it still gets into way when trying to install Luna using this easy way, you may need to look at the "hard way" below.
    # apt-get remove eclipse eclipse-platform
  3. Install a Java 1.7 JDK:
    # apt-get install openjdk-7-jdk
  4. Install Maven:
    apt-get install maven
  5. Get rid of the root access as you won't need it anymore:
    # exit
  6. Download Eclipse. The "for Java EE Developers", "for Java Developers" and "for RCP and RAP Developers" versions all seem to work. Currently the file which was tested to work is (note that it is for 64 bit Ubuntu version) available at this page
  7. Extract the Eclipse installation tarball into your home directory:
    $ cd
    $ tar -xzvf <path/to/your-tar-file>
  8. Increase the memory for the Eclipse installation by modifying the ~/eclipse/eclipse.ini file.
    • Change the -Xmx setting (line 20) to be AT least 1G, recommended 2GB. (i.e. -Xmx2048m).
    • Change the -XX:MaxPermSize (line 18) to at most 512m. If you have the -Xmx setting set to 1G, then I suggest to use a lower value, for example 300m.
  9. Run the Eclipse:
    $ ~/eclipse/eclipse
  10. If everything seems to work, then configure it to have an icon in Desktop
          paste below command into the terminal and hit enter.
     gksudo gedit /usr/share/applications/eclipse.desktop
 
         Above command will create and open the launcher file for eclipse with gedit text editor.
        Paste below content into the opened file and save it.
       [Desktop Entry]
       Name=Eclipse 4
       Type=Application
       Exec=/home/rajeev/eclipse/eclipse
       Terminal=false
       Icon=/home/rajeev/eclipse/icon.xpm
      Comment=Integrated Development Environment
      NoDisplay=false
      Categories=Development;IDE;
      Name[en]=Eclipse

 

Installing Oracle Java 1.8 on Ubuntu 12.4 64bit

Download Oracle Java 1.8 64 bit for unix from  here.

tar -xvf ~/Downloads/jdk-8u40-linux-x64.tar.gz
sudo mkdir -p /usr/lib/jvm/jdk1.8.0

sudo mv jdk1.8.0_40/* /usr/lib/jvm/jdk1.8.0/

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1

sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws
sudo chown -R root:root /usr/lib/jvm/jdk1.8.0
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

mkdir ~/.mozilla/plugins/

ln -s /usr/lib/jvm/jdk1.8.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Setting JAVA_HOME
================
sudo su
which java
gedit .bashrc
#add the following lines
JAVA_HOME=/usr/lib/jvm/jdk1.8.0
export JAVA_HOME
PATH=$PATH:$JAVA_HOME
export PATH=$PATH:/usr/lib/jvm/jdk1.8.0/bin
export PATH

echo $JAVA_HOME

java -version 

Additional step on systems on which sudo clears or restricts environment variables, you also need to add the
following line to the /etc/sudoers file: 

sudo gedit /etc/sudoers

Defaults env_keep+=JAVA_HOME

sudo env | grep JAVA_HOME