How to Install and Configure Eclipse on Ubuntu 12.04 and Ubuntu 12.10 and Ubuntu Server



How to Install Apache Tomcat 6.0.35 on Ubuntu 12.04 Linux

Step 1: Install the Oracle JDK

Install Oracle Java 8 in Ubuntu 12.04

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java8-installer
java –version

OR

Install Oracle Java 7 in Ubuntu 12.04

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Next, copy and paste each command as shown below one-at-a-time to enable Java JDK. Remember to press Enter after each line.

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

Then create a Mozilla plugins folder in your home directory.
mkdir ~/.mozilla/plugins/

Finally, create a symbolic link to your Mozilla plugins folder. For 64-bit systems, replace ‘i386’ with ‘amd64’.

ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/

OR

Manual Install Oracle Java 7 in Ubuntu 12.04

To get started, download Java JDK package from here.
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download jdk-7u3-linux-i586.tar.gz

After saving, extract the downloaded package by running the commands below. This assumes that the package was downloaded in your Downloads folder.
tar -xvf ~/Downloads/jdk-7u3-linux-i586.tar.gz

Next, create a folder for Java JDK files and folders by running the commands below.
sudo mkdir -p /usr/lib/jvm/jdk1.7.0 

Then move all the JDK files and folders to the new location by running the commands below.
sudo mv jdk1.7.0_03/* /usr/lib/jvm/jdk1.7.0/

Next, copy and paste each command as shown below one-at-a-time to enable Java JDK. Remember to press Enter after each line.

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

    Any Problem (Not Working) Run this Two Steps
Inform Ubuntu that this is your default Java installation.

sudo update-alternatives --set java /usr/lib/jvm/jre1.7.0/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/jdk1.7.0/bin/javac

Update your system-wide PATH.

echo "JAVA_HOME=/usr/lib/jvm/jdk1.7.0" >> /etc/profile
echo "PATH=$PATH:$HOME/bin:$JAVA_HOME/bin" >> /etc/profile
echo "export JAVA_HOME" >> /etc/profile
echo "export PATH" >> /etc/profile


Then create a Mozilla plugins folder in your home directory.
mkdir ~/.mozilla/plugins/

Finally, create a symbolic link to your Mozilla plugins folder. For 64-bit systems, replace ‘i386’ with ‘amd64’.
ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/



Step:2 g++ installation
sudo apt-get install g++

Step:3
manually downloading the eclipse IDE package.

First download the eclipse tar.gz package from here.
http://www.eclipse.org/downloads/

Then righ-click the eclipse tar.gz and choose the extract here option to extract the tar.gz package.You can also use the command line to extract the tar.gz package.
       
# tar xzf eclipse-cpp-juno-linux-gtk.tar.gz
  
Move the extracted eclipse in the  /opt/ folder.Before running the below commmand be sure that you are in the directory which contains extracted eclipse folder.

# mv eclipse /opt/
           
Use sudo if the above command gives permission denied message.
                                 
# sudo mv eclipse /opt/

Create a desktop file and place it into /usr/share/applications
              
# sudo gedit /usr/share/applications/eclipse.desktop            
        
and copy the following to the eclipse.desktop file
[Desktop Entry]
Name=Eclipse 
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=eclipse.desktop
  
Create a symlink in /usr/local/bin using
 # cd /usr/local/bin
 # sudo ln -s /opt/eclipse/eclipse

    
Now its the time to launch eclipse.
        
# /opt/eclipse/eclipse  -clean  &           


0 comments:

Post a Comment