Hi Tom,

The -jar command tells the jvm that this is a jar'ed application. This
causes the manifest file in phoenix-loader.jar to be read for a main-class
entry. If you open up the .jar file, you will see a file under the /meta-inf
directory called manifest.mf. Open it in an editor, and you will see the
following line.

Main-Class: org.apache.avalon.phoenix.launcher.Main

That's where things begin. Phoenix then preps and starts James.

More information about jar files may be found at
http://java.sun.com/j2se/1.4.1/docs/ under the Tools section.
Here is a direct link to the manifest files details.
http://java.sun.com/j2se/1.4.1/docs/guide/jar/jar.html#JAR%20Manifest (<-
could go stale)

You should definitely compile james first, if you're already attempting to
examine it in a development environment. Get the 2.0a3 source and start by
making sure that the jar files in your d:\projects\james\lib directory are
in IDEA's project classpath. You might also try looking at/running the ant
build script to get a better feel for how everything is put together.

More information about ant is at http://jakarta.apache.org/ant

Avalon is, of course, at at http://jakarta.apache.org/avalon 

Kris


-----Original Message-----
From: tom
Sent: Tuesday, December 03, 2002 11:43 AM
To: james-user list
Subject: Debugging James with IntelliJ IDEA


I am pretty new to James, but understand most of the concepts (although
Avalon is a little confusing).   

The best way (for me) to learn something is to step through it in a debugger
and see what happens.  Therefore, I am trying to get IntelliJ IDEA (3.0) to
debug James (2.0a3).

Can anyone give me a short description (or point me to one) on how this is
accomplished.  What I am getting stuck on is the run.bat file where it the
phoenix loader is called somehow from this line:

java -Djava.ext.dirs="d:\projects\james\lib" 
-jar "d:\projects\james\bin\phoenix-loader.jar"

(the above is all on one line)

How does it know how to start James and what does the -jar command do?

Is there a way I can reproduce this so I can debug James (say when an SMTP
connection is made, I can set a breakpoint, etc.)

Will this require compiling everything?

Thanks so much...

Reply via email to