Configuring the 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 Java development tools like NetBeans.

Requirements

Software:

  • Eclipse
  • OpenJDK 1.8

Your Eclipse must have support for:

  • Maven
  • Subversion (recommended)

Hardware:

Suggested minimum hardware configuration:

  • 2 CPUs
  • 4 GB of RAM
  • 64-bit architecture (although you can run on 32-bit, we do not recommend this architecture).

Download Eclipse

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

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

Configure Java

You must have Java installed on your server; otherwise go to http://www.oracle.com/technetwork/java/index.html, click on Java SE and download the latest OpenJDK 1.8 version according to your OS and hardware architecture. Run 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. Right-click and from the contextual menu choose "Add / Server". From the list choose "Tomcat 7 Server:

Configure a new Runtime server environment:

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

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

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

 

Edit the launch configuration: add memory parameters (we suggest 2 GB), the sigar library path, and the UTF-8 file encoding in the VM arguments field:

-Xms128m -Xmx2048m -Djava.awt.headless=true -Dfile.encoding=utf-8 -Djava.library.path="/home/openkm/tomcat-8.5.69/lib/sigar"

Add your OpenKM project in the Source tab:

Add CATALINA_PID and LD_LIBRARY_PATH to the 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/openkm/tomcat-8.5.69/lib/sigar

Maven support for Eclipse

The latest Eclipse version comes by default with Maven support plugins already installed. For older Eclipse versions, follow these configuration steps:

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

Older Eclipse versions come without the "Eclipse Marketplace" feature, and the plugins must be installed manually via the Help > New Software option. We encourage using a more recent version of Eclipse.

Subversion support for Eclipse

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

To check out an 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 the bottom-right "m2e Marketplace" link and install the "m2e-subversive" connector.

Older Eclipse versions come without the "Eclipse Marketplace" feature, and the plugins must be installed manually via the Help > New Software option. We encourage using a more recent version of Eclipse.