Results 1 to 8 of 8
  1. #1
    kmm1977 is offline Member
    Join Date
    May 2010
    Posts
    47
    Rep Power
    0

    Default jar file very big

    Hi

    initially when i started making changes to my project , the size of jar file was 2 mb not its 6 mb

    i m sure i ma dding unnecessary things

    please tell me does the import add modules to jar file.

    compared to my older jar file , i have seen following packages added.please give me some idea from where do they come from

    org/apache/html/dom/
    com/lowagie/bc/asn1/
    oracle/sql/
    com/sun/
    com/sun/java/
    com/sun/java/help/
    javax/
    javax/help/
    javax/help/plaf/
    javax/help/plaf/basic/
    javax/help/plaf/basic/images/
    org/jdom/
    org/jdom/adapters/
    org/jdom/adapters/AbstractDOMAdapter.class
    org/apache/log4j/
    org/apache/log4j/xml/

    regards

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Your question doesn't make much sense.
    Which jar file are you concerned about?
    What are exactly are you trying to do?

  3. #3
    kmm1977 is offline Member
    Join Date
    May 2010
    Posts
    47
    Rep Power
    0

    Default jar problem

    sorry for not being clear

    the thing is i find my runnable jar bigger than when i make a normal jar

    when i use eclipse Export Wizard

    for my understanding , based on what conditions are components packed into a jar i.e. for example

    in my runnable jar contents i find
    org/apache/xerces/dom/DocumentImpl.class

    which i import com.sun.org.apache.xerces.internal.dom.DocumentImp l;
    in my application

    i assume import leads to DocumentImpl.class being added to the jar file ( correct me if im wrong )

    But the issue is many other classes are also added to jar
    org/apache/xerces/dom/ASDOMImplementationImpl.class
    org/apache/xerces/dom/ASModelImpl.class
    org/apache/xerces/dom/AttributeMap.class
    org/apache/xerces/dom/AttrImpl.class
    org/apache/xerces/dom/AttrNSImpl.class
    org/apache/xerces/dom/CDATASectionImpl.class
    org/apache/xerces/dom/CharacterDataImpl$1.class
    org/apache/xerces/dom/CharacterDataImpl.class

    My question , why is this happening , and where should i control it ?

    regards

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Who created the runnable jar? If you create the jar file yourself then it's you who decides what goes into it.

  5. #5
    kmm1977 is offline Member
    Join Date
    May 2010
    Posts
    47
    Rep Power
    0

    Default jar problem

    yes
    but i do not need the following

    org/apache/xerces/dom/ASDOMImplementationImpl.class
    org/apache/xerces/dom/ASModelImpl.class
    org/apache/xerces/dom/AttributeMap.class
    org/apache/xerces/dom/AttrImpl.class
    org/apache/xerces/dom/AttrNSImpl.class
    org/apache/xerces/dom/CDATASectionImpl.class
    org/apache/xerces/dom/CharacterDataImpl$1.class
    org/apache/xerces/dom/CharacterDataImpl.class

    which are also added to jar

    dunno why !!

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Ok, answer the following questions.

    Who created the jar?
    If it is you created the jar file, how did you create the jar file?

  7. #7
    kmm1977 is offline Member
    Join Date
    May 2010
    Posts
    47
    Rep Power
    0

    Default jar problem

    i use eclipse Export Wizard --> Selected "Runnable Jar" -->

    Selected option
    "Extract Required Lib into generated jars"

    pressed Finish

    in Eclipse

  8. #8
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    So you are asking eclipse to generate the jar and you don't know exactly what that export function does?
    Better read the eclipse help to find out what the function does and how to make it do what you want.

Similar Threads

  1. Replies: 0
    Last Post: 03-05-2010, 05:21 AM
  2. Replies: 8
    Last Post: 02-18-2010, 01:54 PM
  3. Replies: 0
    Last Post: 02-11-2009, 10:53 AM
  4. To open an image file such as Jpeg file using JAva Program
    By itmani2020 in forum Advanced Java
    Replies: 10
    Last Post: 07-11-2008, 10:57 AM
  5. Replies: 7
    Last Post: 05-23-2008, 04:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •