Results 1 to 14 of 14

Thread: question

  1. #1
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default question

    hi ,i'm currently in an internship,i'm working on a classification image application ,my task is to automate the process of this small software,I've the jar file and i want to know how to get the api of the GUI,i've the one needed for the software work but i need the one of the GUI to be able to events of controls (buttons menus...),I hope there is a way to extract the source code of the GUI.Thank you

  2. #2
    Niveditha's Avatar
    Niveditha is offline Senior Member
    Join Date
    May 2008
    Posts
    307
    Rep Power
    6

    Default

    Hi,
    Extract the jar file by the command
    jar -xvf myJar.jar (Can get more details in Google)
    Open any of the GUI related code and check in imports.
    To finish sooner, take your own time....
    Nivedithaaaa

  3. #3
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    Hi,
    Actually the problem is that i didnt find the api for the GUI,when i click on a button to classify an image i dont know what happend ,that is which block of code is executed,the software is called pixit and it's built in java .Is there any software that can extract the api of the GUI of a jar file ?thanks

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    Jad? (Google that word.)

  5. #5
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    yes yes i've tried it before,but it's not giving the api of the GUI,that is what each control is doing .

  6. #6
    Niveditha's Avatar
    Niveditha is offline Senior Member
    Join Date
    May 2008
    Posts
    307
    Rep Power
    6

    Default

    You meant to say a jar contains the API of GUI like say "JButton" and u want to extract that to get the source code and modify is it?
    To finish sooner, take your own time....
    Nivedithaaaa

  7. #7
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    yeppp,this is it

  8. #8
    Niveditha's Avatar
    Niveditha is offline Senior Member
    Join Date
    May 2008
    Posts
    307
    Rep Power
    6

    Default

    Ok... Right Click on jar say jcalendar.jar and click on "Extract to jcalendar\", this will create a folder structure in the same directory.
    Navigate inside that folder till u get the jar's class file, for above example it would be JCalendar.class.

    There is a 3rd party called jd-gui-0.1.0-0.3.1.windows which will convert .class file to .java file, you can convert JCalendar.class to JCalendar.java, edit it and save it according to your needs.

    U can download the tool from following links:

    1. Download JD-GUI Freeware - You can use this fast Java decompiler to reduce the time and energy you spend on your work. JD-GUI is a standalone graphical...
    2. JD-GUI download page
    To finish sooner, take your own time....
    Nivedithaaaa

  9. #9
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    Quote Originally Posted by Niveditha View Post
    There is a 3rd party called jd-gui-0.1.0-0.3.1.windows which will convert .class file to .java file, you can convert JCalendar.class to JCalendar.java, edit it and save it according to your needs.
    This is exactly what Jad is, but seemingly he is not able to decipher the decompiled code.

  10. #10
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    Well,I did all whay you said but maybe you didn't get my point ,actually I managed to get all the classes that does the job of classification but the code that controls the GUI that will show me how the classes are used is missing and this is the one i'm looking for.

  11. #11
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    If it runs (which I can only assume it does, since you mentioned having the "jarfile" of the application), how can you be "missing" them?

  12. #12
    zizou147 is offline Member
    Join Date
    Mar 2008
    Posts
    14
    Rep Power
    0

    Default

    no,the jar file when extracted ,give only the classes that reprensent the objects needed to have the application do its job,but the code that's behind the GUI,that is the events of buttons and all other staff(when i want to classify an image after importing it ,which object is called and what's is done exactly)this is the code i'm trying to have ,when i asked the company that gave me the software ,they told we cant give you the API for the GUI and now i'm trying to see how to get it .

  13. #13
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    8

    Default

    Does it run (with the jarfile you have)? If yes, you already have the GUI code. It isn't just magically generated out of thin air.

    Edit: And, if it doesn't run with just what you have, and the company said you can't have it, then give it up (at least this line of investigation), or it could actually result in your arrest, if you do manage to "steal" it.

  14. #14
    fishtoprecords's Avatar
    fishtoprecords is offline Senior Member
    Join Date
    Jun 2008
    Posts
    571
    Rep Power
    6

    Default

    You may want to look at NIH's ImageJ library/API. Its designed for scientists looking at images, calculating things, etc.

    ImageJ

    http://rsbweb.nih.gov/ij/]ImageJ
    Last edited by fishtoprecords; 07-04-2008 at 07:06 PM. Reason: remove redundant link

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 08:49 AM
  2. a question
    By slytheman in forum Java Servlet
    Replies: 0
    Last Post: 03-12-2008, 04:11 AM
  3. Need help on this question
    By Deon in forum New To Java
    Replies: 3
    Last Post: 01-27-2008, 03:58 PM
  4. JNI question
    By javaplus in forum New To Java
    Replies: 0
    Last Post: 12-24-2007, 10:18 AM
  5. question about rmi
    By leonard in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 04:19 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
  •