Configuring IDE from a clean Eclipse

We recommend using our OpenKM Portable Development IDE rather than configuring your own.

You can also use IntelliJ IDEA or other development Java tools like NetBeans.

Requirements

Software:

  • Eclipse
  • OpenJDK 1.8

Your eclipse must have support for:

  • Maven
  • Subversion ( recommended )

Hardware:

Suggested minimum hardware configuration:

  • 2 CPU's
  • 4GB of ram
  • 64 bits architecture ( although you can get running on 32 we do not suggest this architecture ).

Download eclipse

We suggest downloading the latest stable version of Eclipse. Eclipse comes with several versions, you should download the "Eclipse IDE for Java EE Developers" for your computer architecture ( 32 or 64 bits ).

More information at https://eclipse.org/downloads/.

Configure Java

You must have Java installed in your server otherwise go to http://www.oracle.com/technetwork/java/index.html click at Java SE and download the latest OpenJDK 1.8 version accorder your OS and hardware architecture. Execute the Java installer and follow the installation wizard.

Go to Window / Preferences / Java / Installed JRE. You must have OpenJDK 1.8 defined here:  

Configure tomcat server

Go to "servers" tab. Click on right click mouse button and from contextual menu choose "Add / server". From the list choose "Tomcat 7 server":

Configure a new Run time server environment:

Choose the "Workbench default JRE" when your default JRE is "OpenJDK 1.8" or choose "OpenJDK 1.8" from JRE list of installed JREs.

Check box Use Tomcat installation ( takes control of tomcat installation ).

Increment start and stop timeouts ( for example to 180 and 120 seconds respectively ).

 

Edit launch configuration: Add memory parameters - we suggest 2GB - sigar library path and utf-8 file encoding at VM arguments field:

-Xms128m -Xmx2048m -Djava.awt.headless=true -Dfile.encoding=utf-8 -Djava.library.path="/home/jllort/software/tomcat-7.0.27-openkm-6-community/lib/sigar"

Add your OpenKM project at source tab:

Add CATALINA_PID and LD_LIBRARY_PATH at environment variables:

CATALINA_PID=$CATALINA_HOME/catalina.pid
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CATALINA_HOME/lib/sigar:/usr/local/apr/lib

or

CATALINA_PID=$CATALINA_HOME/catalina.pid
LD_LIBRARY_PATH=/home/jllort/software/tomcat-7.0.27-openkm-6-community/lib/sigar

Maven support for Eclipse

Latest Eclipse version comes by default with maven support plugins yet installed. For older Eclipse version follow this configuration steps:

  • Go to Help > Eclipse Marketplace
  • Install the plugin named M2Eclipse.

Older Eclipse version comes without the "Eclipse Marketplace" feature and the plugins must be installed manually with Help > New software option. We encourage do use a more recent version of Eclipse software.

Subversion support for Eclipse

  • Go to Help > Eclipse Marketplace
  • Install the plugin named Subversive.

To checkout a SVN project go to File > New > Others > Maven > Check out Maven Projects from SCM.

At the beginning the SCM URL list will be empty, you must click on right bottom "m2e Marketplace" link and install "m2e-subversive" connector.

Older Eclipse version comes without the "Eclipse Marketplace" feature and the plugins must be installed manually with Help > New software option. We encourage do use a more recent version of Eclipse software.