Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JavaService: Use classpath from manifest?

Reply
Thread Tools

JavaService: Use classpath from manifest?

 
 
allancady@yahoo.com
Guest
Posts: n/a
 
      10-28-2005
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

 
Reply With Quote
 
 
 
 
Sharp Tool
Guest
Posts: n/a
 
      10-29-2005

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> 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



 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      10-31-2005
On 28 Oct 2005 12:46:16 -0700, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote, quoted or
indirectly quoted someone who said :

>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.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.classpath file instead of the CLASSPATH Environment variable. dontspammenow@yahoo.com Java 2 03-02-2008 08:19 AM
problem compiling project, classpath in xml ".classpath" "<classpathentry...>" jameshanley39@yahoo.co.uk Java 2 03-02-2007 12:37 PM
while using javac -classpath some.jar some.java (Where does classpath get stored?) Gabe Java 3 08-27-2004 07:02 PM
CLASSPATH, -cp and -classpath misunderstanding? Flip Java 3 02-09-2004 10:09 PM
Re: Classpath when running with the -jar option? Phil Hanna Java 0 06-30-2003 11:30 PM



Advertisments