Results 1 to 5 of 5
  1. #1
    bnrkcdc is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Default Finding Jar files in a class file

    Hi ,

    i want to a know what are the jar files are used in a class file.
    Please anybody help me


    Thanks
    NagRaj

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    what are the jar files are used in a class file.
    No jar files are used in a class file.
    Where did you see that? Can you post here what you are referring to?

  3. #3
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    832
    Rep Power
    6

    Default

    Do u mean the classes from a jar used by the class?
    Ramya:cool:

  4. #4
    bnrkcdc is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Default Finding Packages in a class file

    That means

    How to know what are the packages are used in a class file.

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,331
    Rep Power
    25

    Default

    How to know what are the packages are used in a class file.
    Look at the source for the class file
    or scan the class file for the classes it references. There are tools to do that.
    For example here's the output when I scan a class file using a tool I wrote:
    #Searching the classpath for D:\JavaDevelopment\Testing\ForumQuestions3\DemoWin dows
    #user.dir is: D:\JavaDevelopment\Testing\ForumQuestions3
    #Using classpath: D:\JavaDevelopment\runtime\CheckClassRefs.jar;.

    D:\JavaDevelopment\Testing\ForumQuestions3\DemoWin dows
    DemoWindows
    java/awt/Color
    java/awt/Dimension
    java/awt/event/ActionListener
    java/awt/Font
    java/awt/geom/Ellipse2D
    java/awt/geom/Ellipse2D$Double
    java/awt/Shape
    java/awt/Toolkit
    java/awt/Window
    java/lang/Boolean
    java/lang/Class
    java/lang/Exception
    java/lang/Exception
    java/lang/Float
    java/lang/Math
    java/lang/Object
    java/lang/reflect/Method
    java/lang/String
    java/lang/System
    javax/swing/JFrame
    javax/swing/JLabel
    javax/swing/JRootPane
    javax/swing/Timer
    java/awt/Color
    java/awt/Dimension
    java/awt/event/ActionListener
    java/awt/Font
    java/awt/geom/Ellipse2D
    java/awt/geom/Ellipse2D$Double
    java/awt/Shape
    java/awt/Toolkit
    java/awt/Window
    java/lang/Boolean
    java/lang/Class
    java/lang/Exception
    java/lang/Exception
    java/lang/Float
    java/lang/Math
    java/lang/Object
    java/lang/reflect/Method
    java/lang/String
    java/lang/System
    javax/swing/JFrame
    javax/swing/JLabel
    javax/swing/JRootPane
    javax/swing/Timer

    # Found 24 classes.

    Last edited by Norm; 09-08-2010 at 01:49 PM.

Similar Threads

  1. Class Reflection: Finding super class names
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-23-2008, 08:12 PM
  2. Class Reflection: Finding class name
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-23-2008, 08:12 PM
  3. Class Reflection: Finding class modifiers
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-23-2008, 08:11 PM
  4. Replies: 0
    Last Post: 04-23-2008, 08:10 PM
  5. Class Reflection: Finding implemented interfaces
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-23-2008, 08:09 PM

Posting Permissions

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