JavaService: Use classpath from manifest?

Discussion in 'Java' started by allancady@yahoo.com, Oct 28, 2005.

  1. Guest

    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
    , Oct 28, 2005
    #1
    1. Advertising

  2. Sharp Tool Guest

    <> wrote in message
    news:...
    > 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
    Sharp Tool, Oct 29, 2005
    #2
    1. Advertising

  3. Roedy Green Guest

    On 28 Oct 2005 12:46:16 -0700, 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.
    Roedy Green, Oct 31, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Edward E. Sandfort

    JavaService - need help (please!)

    Edward E. Sandfort, Jul 1, 2003, in forum: Java
    Replies:
    3
    Views:
    3,850
    E Sandfort
    Jul 3, 2003
  2. Juergen Weber

    Ant generating Classpath manifest entry

    Juergen Weber, Nov 4, 2003, in forum: Java
    Replies:
    0
    Views:
    2,471
    Juergen Weber
    Nov 4, 2003
  3. skydvr
    Replies:
    1
    Views:
    5,257
    Frank Buss
    Nov 5, 2004
  4. Nick de Graeve
    Replies:
    0
    Views:
    10,851
    Nick de Graeve
    Nov 8, 2005
  5. Mike Schilling

    Classpath in Jar manifest

    Mike Schilling, Nov 28, 2010, in forum: Java
    Replies:
    1
    Views:
    718
    Roedy Green
    Dec 2, 2010
Loading...

Share This Page