Help: Manifest File


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Help: Manifest File

  1. #1
    dobject Guest

    Help: Manifest File


    Hi everyone,
    We have a java app that includes in its install package some JRE components.
    We use to put these JREs under jre a subdirectory of the App main DIR at
    this point everything works fine and the manifest file looks like:

    Manifest-Version: 1.0
    Main-Class: mycompany.DIR1.MAINCLASSNAME
    Class-Path: .\jre\lib\jh.jar
    Created-By: 1.2.2 (Sun Microsystems Inc.)

    The problem with this approach is when you install more than one copy you
    will duplicate also the JRE components (some 15 Megs).
    To avoid these duplications we decided to put the JREs in a common directory
    such as <WINDIR> (WINNT / Windows)
    to do so the manifest file has to be updated to reflect the jh.jar path.
    I tried a hard coded path: Class-Path: e:\WINNT\jre\lib\jh.jar and got this
    error:
    Exception in thread "main" java.lang.NoClassDefFoundError: mycompany/DIR1/MAINCLASSNAME

    by removing the class-path line I got the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/help/HelpSetException
    at mycompany.DIR1.MAINCLASSNAME.main(MAINCLASSNAME.java:30)

    Please help,
    any idea or suggestions are appreciated.
    Thanks,

    dobject.


  2. #2
    Paul Clapham Guest

    Re: Manifest File

    I don't follow the bit about having to install JRE components at all. You
    only need one instance of the JRE on each computer. Perhaps you meant this
    "jh.jar" file in that category? And you are installing more than one copy of
    your application on one computer? If that's the case, why not put jh.jar
    into the extensions directory, which is the lib/ext directory in your JRE
    installation. That way it's automatically in the classpath without your
    having to say so.

    PC2

    "dobject" <dobject@caramail.com> wrote in message
    news:3eca6e3f$1@tnews.web.devx.com...
    >
    > Hi everyone,
    > We have a java app that includes in its install package some JRE

    components.
    > We use to put these JREs under jre a subdirectory of the App main DIR at
    > this point everything works fine and the manifest file looks like:
    >
    > Manifest-Version: 1.0
    > Main-Class: mycompany.DIR1.MAINCLASSNAME
    > Class-Path: .\jre\lib\jh.jar
    > Created-By: 1.2.2 (Sun Microsystems Inc.)
    >
    > The problem with this approach is when you install more than one copy you
    > will duplicate also the JRE components (some 15 Megs).
    > To avoid these duplications we decided to put the JREs in a common

    directory
    > such as <WINDIR> (WINNT / Windows)
    > to do so the manifest file has to be updated to reflect the jh.jar path.
    > I tried a hard coded path: Class-Path: e:\WINNT\jre\lib\jh.jar and got

    this
    > error:
    > Exception in thread "main" java.lang.NoClassDefFoundError:

    mycompany/DIR1/MAINCLASSNAME
    >
    > by removing the class-path line I got the following error:
    > Exception in thread "main" java.lang.NoClassDefFoundError:

    javax/help/HelpSetException
    > at mycompany.DIR1.MAINCLASSNAME.main(MAINCLASSNAME.java:30)
    >
    > Please help,
    > any idea or suggestions are appreciated.
    > Thanks,
    >
    > dobject.
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center