wiki:Eclipse

Eclipse is the very rich platform for many kinds of helpers for development of applications. It is most commonly known as an Integrated Environment for Development (IDE) for different programming languages, e.g. Java, C/C++ and many many more. Nevertheless due to its plug-in concept, it has evolved to be much more than an IDE, including many features for model based system development, team synchronization and much more. See the http://www.eclipse.org Eclipse website ? to find out more.

Installed Distribution

At our local RTSYS-LAN, some Eclipse versions are installed at a network-attached location available to all. Find the different versions at:

/home/java/

Latest installed distribution:

  • Eclipse 3.4, Codename "Ganymede" /home/java/eclipse
  • The latest version installes is always accessible from the "eclipse" directory. Later versions are available in other dirs, e.g. /home/java/eclipse_3.3
  • There are multiple plugins installed, including C-, Ruby-, Java-, graphical Modelling-, SVN-Plugins.

Technical Help

Running Eclipse

To run Eclipse on your network connected linux machine, simply call

/home/java/eclipse_3.4/eclipse

As many features are quite memory consuming, you should give the virtual machine a little extra memory:

/home/java/eclipse_3.4/eclipse -vmargs -Xmx768M -XX:PermSize=64M -XX:MaxPermSize=256M -Xmn128M

On Windows put the parameters to your eclipse.ini config file, because the Windows jvm doe not support all of the parameters directly. Put there:

  --launcher.XXMaxPermSize 256M
  --launcher.XXPermSize 64M
  -Xmn128m
  -Xmx768m 
  • PermSize: The section of heap memory reserved for permanent object generation and comprising all reflection data
  • Xmn: Heap space reserved for young objects (too small: gc runs too often, too big: gc runs very long)
  • more: see  Java Virtual Machines Optimieren

Java Version

Most features require Java Version >=5!

  • Set your PATH env-variable to a java version of >=5
  • e.g. point to the network installation at: /home/java/jdk1.6.0
  • to make this permanent, add the following line to the file .bashrc in your home-dir: export PATH=/home/java/jdk1.6.0/bin:$PATH

Speed Up Eclipse

The Eclipse distro is quite big: about 500MB. Running it from the network makes the eclipse startup quite slow. Even at work, all required plug-ins are only loaded on demand and therefore must be loaded from the network-drive at runtime, which slows down eclipse a lot.

  • to speed up: ask the system administrator to copy the whole eclipse dir to your local machine
  • do not copy the dir to your home directory''' this is a network drive, too!
  • Please note: Eclipse seems to block sometimes, because it loads plug-ins only on demand. After the plug-ins are loaded, it will be fast even running from the network drive. So if you work with an eclipse instance for a couple of hours, it's usually no problem to run it from the network drive. Just be patient :-)

Subversion

There is  Subversive installed to integrate Subversion into Eclipse.

Requirements:

  • JavaHL native library on your system (e.g. libsvn-java package on debian)
  • set the java.library.path to the JavaHL dir with the -D commandline parameter: eclipse -vmargs -Djava.library.path=/usr/lib/jni

Additional Plug-Ins

If you need additional plug-ins, there are two possibilities

  • use the eclipse update manager (at help menu) to install to your local home directory at ~/.eclipse
    • good for small extravagant plug-ins
    • bad for large plug-ins, because you waste network drive space
  • ask your admin to install the plugin globally
    • simply good :-)

Use Native Libraries

To use e.g. Graphviz in an Eclipse testing application:

  • open Run Configuration within the parent Eclipse
  • edit an Run Configuration entry for an Eclipse Application
  • Switch to Environment tab
  • Add new variable LD_LIBRARY_PATH
  • Set the value to the absolute path of the library directory, e.g. /home/<login>/shared/kieler/trunk/kiml/edu.unikiel.rtsys.layouter.graphviz/lib