문제

i am running james as window service.I have put my mailet their in config.file which further calls my my application specific libs. Now i want to debug the some classes in my application once i receive the mail. I am not getting how to start the james window service in debug mode so that i can connect to same port from my eclipse and start debugging.

One more thing is james server works fine when i start it as window service but once is start it using James.bat file it gives some errors related to my application. so looks like running james from James.bat is out. Please provide your inputs how i can start james service in debug mode. james version is 2.3.2

도움이 되었습니까?

해결책

James doesn't support start in debug mode, so you have to start it in debug mode by yourself. For James 3 (beta) it's easy, I assume you can use this solution for version 2.3.2 as well.

  1. First create rundebug.bat file in JAMES\bin directory with the following content:

    set JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

    run.bat

  2. Run it from command line. James server is now ready for remote debugging.

  3. In Eclipse, create a new "Remote Java Application" in Debug Configurations dialog with default configuration. In "Project" field choose the project that contains the mailets you want to debug.

  4. Place breakpoints and run the configuration.

Good luck!

다른 팁

You should uncomment following row in JAMES_HOME/bin/run.bat to get enable remote debugging:
from

rem set DEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y

to

set DEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top