Page 1 of 1

How to build and debug OpenEMM by using Eclipse?

Posted: Tue Sep 14, 2010 5:37 am
by aunthas
Customizing OpenEMM for me is time consuming and so cumbersome. I have to build the whole project with Ant every time I want to test my single change. This gives me only final results without any clue of debugging information.

So I would like to ask for steps on building and debugging OpenEMM by using Eclipse. Or are there other ways to mitigate this unwieldy burden?

Posted: Thu Oct 14, 2010 7:49 am
by maschoff
Just to make sure I understand you correctly: You need an archive file containing an OpenEMM release as Eclipse project (including files .project and .classpath) which you would like to import into Eclipse?

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Tue May 31, 2011 11:24 am
by profondino
To use eclipse remote debugging you first need an OpenEMM eclipse project, but this is an easy job using the open sources. Once having your project you must run the httpd java process with jdb debugging options. to reach this just add the following text to your core.sh bash:

Code: Select all

 -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 
Than in eclipse create a new Debug Configuration of type Remote Java Application. Use connection type standard (socket attach) and set your host and port correctly (8000). Finally click Apply and Debug. Now your eclipse debug process should connect to your httpd application, which is patiently awaiting this connect (suspend=y). Setting some breakpoints will quickly enable you to jump through the running app! Hope that helps :)

Code: Select all

export LANG=en_US.UTF-8
export RESIN_HOME=$HOME

echo ""
echo "+-------------------------------"
echo "|  $1 Resin httpd server..."
echo "+-------------------------------"
echo "$HOME/bin/httpd.sh -J-Xms128m -J-Xmx512m -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=n -conf $HOME/conf/core.conf -server-root $HOME/webapps/core -jvm-log $HOME/webapps/core/log/openemm_jvm.log -stderr $HOME/webapps/core/log/openemm_stderr.log -stdout $HOME/webapps/core/log/openemm_stdout.log -server core -pid $HOME/var/run/core.pid $args $*"

# -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 
$HOME/bin/httpd.sh -J-Xms128m -J-Xmx512m -conf $HOME/conf/core.conf -J-Xdebug -J-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000  -server-root $HOME/webapps/core -jvm-log $HOME/webapps/core/log/openemm_jvm.log -stderr $HOME/webapps/core/log/openemm_stderr.log -stdout $HOME/webapps/core/log/openemm_stdout.log -server core -pid $HOME/var/run/core.pid $args $*

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Tue Nov 05, 2013 10:09 am
by Yuna
Hi,
i know this topic is a bit old. but is there a description how to get an usable eclipse version out of the source files?
i was creating a web project and was inserting the librarys in the buildpathes. but there are still some errors.
so whats missing? and my eclipse is stucking at validating "src\jsp\fckeditor-2.6.6\editor\_source"
is it even possible with windows? cause of the .sh files....

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Tue Nov 05, 2013 10:18 am
by maschoff
Did you read the Code Design Guide, section 2.1?

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Tue Nov 05, 2013 3:51 pm
by Yuna
maschoff wrote:Did you read the Code Design Guide, section 2.1?
yes but there is nothing with windows or/and eclipse :S

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Thu Nov 07, 2013 3:36 pm
by maschoff
If you want to edit OpenEMM's source code in Eclipse follow these steps:
- download and install Eclipse IDE for Java EE Developers
- create a new dynamic web project with source folders src/java + src/conf and content directory src/jsp
- unpack the OpenEMM source tarball
- import the unpacked files (and overwrite dummy files in dynamic web project)
- add all JARs from directory lib to the project's build path
Eclipse is available for both Linux and Windows.

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Fri Nov 08, 2013 8:11 am
by Yuna
i know :roll: but how do i set OpenEMM up in eclispe?
i would like to run it from eclipse

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Fri Nov 08, 2013 10:39 am
by Anton
OpenEMM is definitely not the best project for you to learn about Java programming on. The community is relatively small, and contributions from it are rare (either in support or code - I don't believe there's even community SCM).

Re: How to build and debug OpenEMM by using Eclipse?

Posted: Fri Nov 08, 2013 12:41 pm
by Yuna
I am not new to Java and just want to know how to run it with eclipse. i cant understand whats so difficult to tell me how set it up.
just a simple explaination what kind of eclipse project, where to put the files in, which jars i neex (cause i still have some errors after adding the jars), how to setup tomcat,....