• Post Reply Bookmark Topic Watch Topic
  • New Topic

viewing a jar file content  RSS feed

 
sai rama krishna
Ranch Hand
Posts: 536
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a jar file. I need to open and see the source code in the jar file to override some of the style related code like primefaces-3.4 related
org.primefaces.component.behavior.printer.PrinterBehavior.getScript()

How do I see jar content.

please advise
Any links resources ideas highly appreciated. Thanks in advance
 
Joel Christophel
Ranch Hand
Posts: 250
1
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you're looking for is called a decompiler. This is the one I use: http://jd.benow.ca/
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the other hand, if you just want to see what files are in the jar, then simply rename it to have a .zip extension and open it with anything that understands ZIP files.

That's assuming that there is actually source code in the jar and not compiled classes. If you're talking about open-source code (and it sounds like you are) it might be easier to just get the source code from the same place you got the compiled classes, rather than decompiling them. Decompilers don't produce an accurate copy of the original source, they just produce a reasonable copy which will compile back into an equivalent class. For example they can't tell the actual names of local variables and parameters, so they just produce something which may be less useful then the original. If you don't have the source code then a decompiler can be a life-saver, but if you do, you don't need a decompiler.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
org.primefaces.component.behavior.printer.PrinterBehavior.getScript()

If it's the source to one of the PrimeFaces classes, you'd be better off downloading the complete source code from the PrimeFaces web site - it is open source, after all.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!