• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

How to reverse engineer a java gui

 
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
 
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.

 
Marshal
Posts: 65365
248
  • 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
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!