commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Mielke <andreasmie...@googlemail.com>
Subject Re: [DAEMON] procrun - java Property File
Date Mon, 17 Jan 2011 10:33:23 GMT
2011/1/17 Konstantin Kolinko <knst.kolinko@gmail.com>

> 2011/1/17 Andreas Mielke <andreasmielke@googlemail.com>:
> > Hello JP,
> >
> > I look at the files and the loading of the properties files is like me.
> My
> > problem is to tell the Apache Common Daemon where is my property file.
> >
> > @ Konstantin I try the JvmOption like prunsrv //IS
> --Description="DMSImport"
> > --DisplayName="startImport" --Startup=auto --Type=interactiv
> > --Install=java.exe --Jvm=auto --StartMode=Java --StopMode=Java
> ++JvmOptions
>
> You are not specifying "--Classpath". How java is supposed to find your
> program?
>

I don't posted the --Classpath, sorry. The complete command is:

prunsrv //IS --Description="DMSImport" --DisplayName="startImport"
--Startup=auto --Type=interactiv --Install=java.exe --Jvm=auto
--StartMode=Java --StopMode=Java --StartClass=dmswrapper.DMSImporter
--Classpath=%CLASSPATH%;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\DMSWrapper.jar;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\log4j-1.2.15.jar;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\log4j-extensions.jar;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\commons-codec-1.3.jar;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\commons-httpclient-3.1.jar;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\commons-logging-1.1.1.jar;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\commons-net-2.0.jar;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\EloixClient.jar;
++JvmOptions
-D=C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\DMSWrapper.properties;
--LogPath="C:\Programme\commons-daemon-1.0.5-bin-windows\logs"
--LogLevel=Debug --StdOutput=auto --ServiceUser=********
--ServicePassword=*******(private ;-) )


>
> > -D=C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\log4j.properties;
> >
> -D=C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\DMSWrapper.properties;
> >
> >
> > But I have a FileNotFoundException.
> >
> > Of Course I try ++JvmOptions
> >
> -D="C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\log4j.properties;C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\DMSWrapper.properties;"
>
> That quotes would be
>
> --JvmOptions
> "-D=C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\log4j.properties#-D=C:\Programme\DMS_ImageBrowser\DMSWrapper-binary-1.2\DMSWrapper.properties"
>
> but anyway, your "-D" makes no sense: you are not specifying the name
> of a system property.
>
>
> > One point the Javaapplication is not writen by me.
>
> Is "DMSWrapper" your program, or it is a part of the "not writen by
> me" application?
>

This is the foreign program, I know the principal functions but no lines of
code.

>
> How is that application run when you do not use your wrapper?


I start a cmd-file (), one command line starts and the properties are load
automatical without problems.


> -- Does
> it load those properties files? How does it find them?   Ask the
> developers of the original app. That is why I already asked you:
>
> >> If you were running your app with java(w).exe, what would be your
> command line?
>

yes. A CMD- File with the command java -cp ... .

>
>
> The log4j.properties file is usually placed into a directory that is
> added to the ClassPath (and thus there is no need to specify its
> location explicitly).
>
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message