• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to reverse engineer a java gui  RSS feed

 
gianni ipez
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a product composed by an exe file written in java, and a bunch of jar files of various type.
I don't have source files of this application, and neither a single page of documentation.

Maybe reverse engineering would is too difficult to do, but is there any way
to know which jar classes/methods are created/invoked when i push the buttons on the gui?
Is there any trick to do that?
thank you very much,
Gianni
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gianni: This is an interesting question. It would be helpful to know
why you need this information. Can you explain further?

Jim ...
 
gianni ipez
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand what you mean.
The product is an old one, not maintained any more from the factory that produced it.
They have built a new version that my favtory didn't want to buy, too expensive.

I would like simply to take out a functionality of the gui and to execute it in a batch java program,
In my work every day I need to press 100 times the same button of this old gui...

I'd only like to simplify my life of programmer and understand better how java works.

 
Campbell Ritchie
Marshal
Posts: 56533
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't get the source code from its original creator? And the license permits reverse engineering?
 
gianni ipez
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think I can get the source files, but I can ask my boss to ask for them.
Thank you
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell has a very important point here. Licensing. If this is not an in house product, I would doubly ensure reverse engineering is legal.

I would like simply to take out a functionality of the gui and to execute it in a batch java program,
In my work every day I need to press 100 times the same button of this old gui...

If I am not mistaken, there are test automation tools available which you can configure to press the button 100 times.
You can also do it yourself. Check out the Robot class in Java !

If you still insist on taking out the GUI totally, this might be one of the ways possible.
Check the manifest file. That should give you the main class.
Write a small main class of your own which in turn calls the jar's main().
Run in debugger, stepping into the calls. you should get the class/method names and the sequence.
 
gianni ipez
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maneesh,
thank you, I hadn't thought about Robots, I'll study the subject.
I found a lot of manifest.cs in the application, but all of them have only these lines:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.2
Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)
don't find the class to start with.
Maybe it can be in other files?

As for the license file I couldn't find a place in which they mention reverse engineering
 
gianni ipez
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
update:
I found
a Java Network Launching Protocol and API (JNLP) file where there is the class name!
good start.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!