|
From: Leif M. <le...@ta...> - 2004-01-27 00:56:49
|
Stephane,
You can easily include a directory containing a list of class files
by adding that directory
as a classpath element:
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../lib/activation.jar
wrapper.java.classpath.3=../lib/mail.jar
wrapper.java.classpath.4=../lib
The above assumes that you have placed your class files into a
directory structure located under
the lib directory. For example, com.tanukisoftware.coolapp.Main would
be a file:
../lib/com/tanukisoftware.coolapp/Main.class
This is the same way you would specify such a classpath using stand
alone java to run your
application.
Hope this helps,
Cheers,
Leif
Stéphane Merle wrote:
> Hi,
>
> I looked around the doc and the sample and tried to have my own
> creation to word as a windows services. I started from the sample and
> change it for my app. The problem is that the sample is using a jar
> file as a app, but mine are straight .class files, should I create
> a .jar file ?
>
> here is the log dump :
>
> STATUS | wrapper | 2004/01/22 10:04:45 | --> Wrapper Started as Service
> STATUS | wrapper | 2004/01/22 10:04:46 | Launching a JVM...
> INFO | jvm 1 | 2004/01/22 10:04:46 | WrapperSimpleApp: Unable to
> locate the class MYXMLServer: java.lang.ClassNotFoundException:
> MYXMLServer
> INFO | jvm 1 | 2004/01/22 10:04:46 |
> INFO | jvm 1 | 2004/01/22 10:04:46 | WrapperSimpleApp Usage:
> INFO | jvm 1 | 2004/01/22 10:04:46 | java
> org.tanukisoftware.wrapper.WrapperSimpleApp {app_class} [app_parameters]
> INFO | jvm 1 | 2004/01/22 10:04:46 |
> INFO | jvm 1 | 2004/01/22 10:04:46 | Where:
> INFO | jvm 1 | 2004/01/22 10:04:46 | app_class: The fully
> qualified class name of the application to run.
> INFO | jvm 1 | 2004/01/22 10:04:46 | app_parameters: The
> parameters that would normally be passed to the
> INFO | jvm 1 | 2004/01/22 10:04:47 | application.
> STATUS | wrapper | 2004/01/22 10:04:49 | <-- Wrapper Stopped
>
> I setup the folder like this :
>
> D:\http\XMLserveur_java -- main folder with the .class
> files of my app (my main class is MYXMLServer.class)
> D:\http\XMLserveur_java\bin -- the 3 bach files, the
> wrapper.exe and the wrapper.log file
> D:\http\XMLserveur_java\conf -- the wrapper.conf file see under this
> D:\http\XMLserveur_java\lib -- wrapper.jar,
> wrappertest.jar(should'nt be used), Wrapper.dll and 2 jar files for me
> : activation.jar and mail.jar
>
> here is my conf file :
>
>
> #********************************************************************
> # Wrapper Properties
> #********************************************************************
> # Java Application
> wrapper.java.command=C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\bin\java
>
> # Java Main class. This class must implement the WrapperListener
> interface
> # or guarantee that the WrapperManager class is initialized. Helper
> # classes are provided to do this for you. See the Integration section
> # of the documentation for details.
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
>
>
> # Java Classpath (include wrapper.jar) Add class path elements as
> # needed starting from 1
> wrapper.java.classpath.1=../lib/wrapper.jar
> # wrapper.java.classpath.2=../lib/wrappertest.jar
> wrapper.java.classpath.2=../lib/activation.jar
> wrapper.java.classpath.3=../lib/mail.jar
>
> # Java Library Path (location of Wrapper.DLL or libwrapper.so)
> wrapper.java.library.path.1=../lib
>
> # Java Additional Parameters
> #wrapper.java.additional.1=
>
> # Initial Java Heap Size (in MB)
> wrapper.java.initmemory=3
>
> # Maximum Java Heap Size (in MB)
> wrapper.java.maxmemory=64
>
> # Application parameters. Add parameters as needed starting from 1
> wrapper.app.parameter.1=MYXMLServer
>
> #********************************************************************
> # Wrapper Logging Properties
> #********************************************************************
> # Format of output for the console. (See docs for formats)
> wrapper.console.format=PM
>
> # Log Level for console output. (See docs for log levels)
> wrapper.console.loglevel=INFO
>
> # Log file to use for wrapper output logging.
> wrapper.logfile=../logs/wrapper.log
>
> # Format of output for the log file. (See docs for formats)
> wrapper.logfile.format=LPTM
>
> # Log Level for log file output. (See docs for log levels)
> wrapper.logfile.loglevel=INFO
>
> # Maximum size that the log file will be allowed to grow to before
> # the log is rolled. Size is specified in bytes. The default value
> # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
> # 'm' (mb) suffix. For example: 10m = 10 megabytes.
> wrapper.logfile.maxsize=0
>
> # Maximum number of rolled log files which will be allowed before old
> # files are deleted. The default value of 0 implies no limit.
> wrapper.logfile.maxfiles=0
>
> # Log Level for sys/event log output. (See docs for log levels)
> wrapper.syslog.loglevel=NONE
>
> #********************************************************************
> # Wrapper NT Service Properties
> #********************************************************************
> # WARNING - Do not modify any of these properties when an application
> # using this configuration file has been installed as a service.
> # Please uninstall the service before modifying this section. The
> # service can then be reinstalled.
>
> # Name of the service
> wrapper.ntservice.name=BINGOXMLServer
>
> # Display name of the service
> wrapper.ntservice.displayname=Serveur Socket XML pour le BINGO
>
> # Description of the service
> wrapper.ntservice.description=Serveur Socket XML pour le BINGO
>
> # Service dependencies. Add dependencies as needed starting from 1
> wrapper.ntservice.dependency.1=
>
> # Mode in which the service is installed. AUTO_START or DEMAND_START
> wrapper.ntservice.starttype=AUTO_START
>
> # Allow the service to interact with the desktop.
> wrapper.ntservice.interactive=false
>
>
> Thanks for any help you can provide.
>
> Stéphane Merle
|