Eclipse

From KevinWiki

Jump to: navigation, search


Eclipse is a software development platform which consists of an IDE and plug-in systems. It supports many different computer languages although it is written in Java and its primary language support is Java.

TODO: The contents about the following headings should be done.

Contents

Installation

Download

Install

Configuration & Plug-ins

Configuration

Plug-in Install

Plug-in Update Manager

Enabling the Class Update Manager

There may come a time when it is required to use the classic update manager rather than the new one in Eclipse Ganymede. One good example is Aptana as a plug-in of Eclipse Ganymede. If it is Eclipse Europa (3.3) which uses the classic update manager, Aatana can be just installed through the manager. However, if it is Ganymede (3.4), the classic update manager has to be manually enabled to be used to install Aptana (This is not necessary as Aptana now has the update site for Ganymede).

  • One possible way to enable it is using the 'Capabilites' option of Eclipse.
  1. Select 'Preferences' in the 'Window' menu in Eclipse.
  2. Expand the 'General' category on the left hand side
  3. Click 'Capabilites'
  4. Check the Classic Update check box.

Now the classic update manager can be found from the 'Help' menu in Eclipse.


  • Another easier way

The way explained above is only possible when it is Eclipse SDK meaning non-SDK versions do not have the 'Capabilites' option. However, there is easier way to do it.

-Create any workspace through Eclipse or the old one can be used as well.

-Close Eclipse if it is running.

-Open the file below.

your_workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs 

-Add the following line (Do not put the end of the existing line. It must be a new line).

UIActivities.org.eclipse.equinox.p2.ui.sdk.classicUpdate=true

-Run Eclipse and the classic update manager can be found from the 'Help' menu in Eclipse.


Plug-in Manual Installation

Using dropins (Ganymede)

  • When it is required to install plug-ins by copying plugins and features directories to the Eclipse main directory as there is no update site for the plug-ins, droupins directory can be used as a safer and easier way to do this.
  • Whenever Eclipse is started, it checks the dropins directory and if there are newly copied plugins, it installs these. When it happens Equinox p2 checks if there is any conflict with other plug-ins installed. P2 also or checks if there are any dependencies regarding the new plug-ins, and if so it solves this with fetching dependencies.
  • If the installed plugins in the droupins direcory are removed. P2 can also automatically removed these from Eclipse when startup.
  • The files which can be copied to the droupins directory are jar file or plug-in directories.
 eclipse/
    dropins/
       org.eclipse.someplugins.jar
       org.eclipse.plugins-directory/
          plugin.xml
          another-plugin.jar

or

 eclipse/
    dropins/
       eclipse/
          features/
          plugins/

or

 eclipse/
    dropins/
       plugin1/
          eclipse/
             features/
             plugins/
       plugin2/
          eclipse/
             features/
             plugins/


Troubleshooting

Eclipse Update Site Works too Slow

If there is any Eclipse update site works to slow, adding the site address to the localhost IP can be a very easy way to make the Update Manager ignore that site.

For example, if it takes too long to download files from eclipse.stu.edu.tw. Add it to localhost IP address then it will be ignored when updating. (In my case it really took too long to download from eclipse.stu.edu.tw).

-Open /etc/hosts

127.0.0.1 localhost blah blah eclipse.stu.edu.tw


Too Many Open Files

If Eclipse keeps showing error messages like below.

Plug-in org.eclipse.jst.server.tomcat.core was unable to load class org.eclipse.jst.server.tomcat.core.internal.TomcatLaunchConfigurationDelegate.
 /eclipse_installed_path/eclipse/configuration/org.eclipse.osgi/.lazy.15 (Too many open files)
Problems occurred while trying to save the state of the workbench.
 Could not read master table.
 /your_workspace/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources (Too many open files)

This happens because Eclipse opens more files than the number of files can be opened.


-To see the open files, use lsof (list open files) and wc to count the lines.

$ lsof | wc -l 
8965

-To see the files opened by Eclipse

$ lsof | grep eclipse | wc -l 
2094

-To see the limitation of open files

$ ulimit -a 
core file size          (blocks, -c) #
data seg size           (kbytes, -d) #
scheduling priority             (-e) #
file size               (blocks, -f) #
pending signals                 (-i) #
max locked memory       (kbytes, -l) #
max memory size         (kbytes, -m) #
open files                      (-n) 1024
pipe size            (512 bytes, -p) #
POSIX message queues     (bytes, -q) #
real-time priority              (-r) #
stack size              (kbytes, -s) #
cpu time               (seconds, -t) #
max user processes              (-u) #
virtual memory          (kbytes, -v) #
file locks                      (-x) #
or
$ ulimit -n 
1024


-To change it, put a big number to the open files limitation. Open the file /etc/security/limits.conf and add the following lines.

$ gksudo gedit /etc/security/limits.conf 
*                soft    nofile          14336
*                hard    nofile          14336

-Log out and in then check with ulimit. It should show like this.

$ ulimit -n 
14336


-If it is still not changed. Restart the computer and check again. If it still doesn't show the changed value, open /etc/pam.d/common-session file and add the following line.

$ gksudo gedit /etc/pam.d/common-session 
session required pam_limits.so

-Log out and in.

-Now it should work!

$ ulimit -n 
14336
Personal tools