JavaService: Use classpath from manifest?

A

allancady

I have an application packaged in a jar file, and I specify the
classpath for all of the application's dependencies in the jar file's
manifest.mf:

Main-Class: com.us.ourapp.Main
Class-Path: ../lib/commons-beanutils.jar
../lib/commons-collections-3.1.jar
../lib/commons-configuration-1.1.jar
etc.

This makes it very handy to run the app from the command line:

java -jar dist\ourapp.jar

Now I'm trying to deploy the app as a service, using JavaService. I've
used JavaService before, but I specified the full classpath explicitly
on the JavaService install command
(using -Djava.class.path...) Now I'm trying to figure out if it's
possible to use the -jar approach with JavaService, such that it uses
the classpath from the manifest. So far no luck.

Can anyone tell me if this is something that JavaService supports, and
if so, how to do it? Or am I out of luck?

Thanks,

Allan
 
S

Sharp Tool

I have an application packaged in a jar file, and I specify the
classpath for all of the application's dependencies in the jar file's
manifest.mf:

Main-Class: com.us.ourapp.Main
Class-Path: ../lib/commons-beanutils.jar
../lib/commons-collections-3.1.jar
../lib/commons-configuration-1.1.jar
etc.

This makes it very handy to run the app from the command line:

java -jar dist\ourapp.jar

Now I'm trying to deploy the app as a service, using JavaService. I've
used JavaService before, but I specified the full classpath explicitly
on the JavaService install command
(using -Djava.class.path...) Now I'm trying to figure out if it's
possible to use the -jar approach with JavaService, such that it uses
the classpath from the manifest. So far no luck.

Can anyone tell me if this is something that JavaService supports, and
if so, how to do it? Or am I out of luck?

Thanks,

Allan

NEver heard of JavaService.
You have a link?

Sharp tool
 
R

Roedy Green

Can anyone tell me if this is something that JavaService supports, and
if so, how to do it? Or am I out of luck
see http://javaservice.objectweb.org/

I suggest an experiment.

Just write a minimal app with the startup, main and shutdown methods
and dump the system properties. Try classForName on some classes in
various jars to see if they are accessible.

See http://mindprod.com/jgloss/properties.html

Please report back with what you find out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top