james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Forbes, Chris" <CFor...@APEngines.com>
Subject RE: Starting James
Date Wed, 20 Feb 2002 21:30:38 GMT
Silvio,

I have installed James, version 2.02a, and have managed to start it from my
Java test program, StartJames.  The Main you were looking for is in in the
jar file, dst/bin/phoenix-loader.jar and its fully qualified name is:
org.apache.avalon.phoenix.launcher.Main. 

By looking at the run.bat file in the same directory, you can glean that you
need to set the path to the lib directory by the -D option to the JVM:
example:
java -Djava.ext.dirs=c:/mypath/dst/bin
org.apache.avalon.phoenix.launcher.Main

Note: 'dst' stands for distribution directory. It is where-ever you
installed James. Also, before you issue the above command, you need to have
the path to the JVM and to the phoenix-loader.jar and the phoenix-engine.jar
in your CLASSPATH.  These last two jar files are in the 'bin' directory I
mentioned above.  

Try the above command with the -h option:
java -Djava.ext.dirs=c:\mypath\dst\lib
org.apache.avalon.phoenix.launcher.Main -h
By doing so, you will see the various options you have.  

If you are doing this from within a java class (as is my case), you need to
start that class with the same -D'def' as above. For example:
java -Djava.ext.dirs=c:\mypath\dst\lib StartJames
Inside that class, StartJames in this case, you need to instantiate an
instance of org.apache.avalon.phoenix.launcher.Main and you need to call
it's 'main' function as in: String [] args = {"-a", "c:/mypath/dst/apps"};
myMain.main(args);
where 'myMain' is the instance name of the ..Main class.

Hope this helps,

Chris

-----Original Message-----
From: Silvio Katzan [mailto:katsi@katsi.de]
Sent: Wednesday, February 20, 2002 9:42 AM
To: James Developers List
Subject: RE: Starting James


Hi Paul,

first thanks for your answer.
The question is, in which jar- file do I find the
org.apache.avalon.loader.Main class.
I had a look on every jar from the avalon- project and I was not able to
find it.
The plan at the end is to start james with my application.

Hope this is clearer now.

Silvio

> -----Original Message-----
> From: Paul Hammant [mailto:Paul_Hammant@yahoo.com]
> Sent: 20 February 2002 15:05
> To: James Developers List
> Subject: Re: Starting James
>
>
> Silvio,
>
> The context of your question is not well defined. Put it another way, I
> do not know really what you are asking.
>
> - Paul
>
> >Hi Chris and Paul,
> >
> >is this only working with 1.2.1, because I tried to find the
> >org.apache.avalon.loader.Main class but I didn't succeeded.
> >I'm trying to start james 2.02a, but I have the problem I
> described above.
> >
> >Can you help me?
> >Thanks a lot,
> >
> >Silvio
> >
> >>-----Original Message-----
> >>From: Paul Hammant [mailto:Paul_Hammant@yahoo.com]
> >>Sent: 20 February 2002 08:18
> >>To: James Developers List
> >>Subject: Re: FW: Starting James in same jvm
> >>
> >>
> >>Chris,
> >>
> >>Make you application a Phoenix block.  <depend> on the interfaces
> >>offered by James for true interaction.
> >>
> >>Be in the same VM as Jo!, JabberServer, AvalonDB, Jesktop, etc etc too.
> >>
> >>- Paul
> >>
> >>>>-----Original Message-----
> >>>>From: 	Forbes, Chris
> >>>>Sent:	Tuesday, February 19, 2002 9:02 PM
> >>>>To:	'james-dev-help@jakarta.apache.org'
> >>>>Subject:	Starting James in same jvm
> >>>>
> >>>>I am trying out James, version 1.2.1, on NT4.0, patch 6.
> >>>>
> >>>>I wish to start James from my own Java application and to
> this end have
> >>>>written a small test java class, StartJames, that instanciates
> >>>>
> >>an instance
> >>
> >>>>of org.apache.avalon.loader.Main and then calls the main
> routine with an
> >>>>args vector that has: {"-c", "config path", "-p",
> >>>>"org.apache.xerces.parsers.SAXParser", "-l" "path to avalon.log"}.
> >>>>
> >>>>Of course, the arguments in args are valid paths.  When I run
> this test
> >>>>program, I get the following output:
> >>>>parser            : org.apache.xerces.parsers.SAXParser
> >>>>configurationPath : d:/Program Files/MailServer/James/conf/
> >>>>logFile           : d:/Program Files/MailServer/James/logs/avalon.log
> >>>>libPath           : ../lib/
> >>>>blockPath         : ./blocks/
> >>>>
> >>>>The first three items are fine, just as I specified in the
> args vector.
> >>>>
> >>>>My problem is that the last two items seem to be hard coded,
> >>>>
> >>"../lib" and
> >>
> >>>>"./blocks".  If I actually put those directories relative to the place
> >>>>where I run my test program, then it works fine.  But that is not very
> >>>>configurable and won't work for the purpose I have in mind.
> >>>>
> >>>>My question is: Is there a way to make
> >>>>
> >>org.apache.avalon.loader.Main aware
> >>
> >>>>of libPath and blockPath? For instance, via a call to
> >>>>System.setProperty("libPath","path").
> >>>>
> >>>>If not, is there another way to start James programatically?
> >>>>
> >>>>Thanks,
> >>>>
> >>>>Chris Forbes
> >>>>
> >>>--
> >>>To unsubscribe, e-mail:
> >>>
> >><mailto:james-dev-unsubscribe@jakarta.apache.org>
> >>
> >>>For additional commands, e-mail:
> >>>
> >><mailto:james-dev-help@jakarta.apache.org>
> >>
> >>>
> >>>
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >><mailto:james-dev-unsubscribe@jakarta.apache.org>
> >>For additional commands, e-mail:
> >><mailto:james-dev-help@jakarta.apache.org>
> >>
> >>
> >
> >
> >
> >------------------------------------------------------------------------
> >
> >--
> >To unsubscribe, e-mail:
<mailto:james-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>
>




--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message