Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Java project from a jar

 
Ranch Hand
Posts: 91
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone please tell me if there is any tool that can automatically make a netbeans or eclipse java project out of a jar (basically decompiling).
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jar is nothing but an archive format like zip.
Using eclipse, you can definitely import the jar and have a project, presuming it contains the valid .project file.

On the other hand, if you have a jar with class files only, it will not automatically decompile it for you.
It might be noted that the licenses may explicitly forbid decompiling and doing so might be illegal.
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
>(basically decompiling)
Try this http://www.kpdus.com/jad.html to decompile class files from jar into java sources.
 
Ranch Hand
Posts: 106
Mac Mac OS X Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as said by Maneesh Godbole, jar files are nothing but a .zip file, so try this:
//(i'm not sure if it'll work)

  • copy your jar file to another directory, only for safe
  • get one of your copies, and chage the extension from .jar to .zip (.rar if you wish)
  • unzip this file into another folder
  • check this folder for a .project file
  • if it exists, open it on eclipse, netbeans, whatever.
  • if it don't exists, check for a src folder, there you'll find all the java files
  • if theres no .project and no src folder...
  • decompile all the classes (Dmitry Mamonov's post)(i'm not sure if it's legal, in this circunstances probably somebody dont want you to see the source.)
  • jad will generate .jad files, for you to open in properly on your IDE, change the .jad extension to .java


  • i repeat, i'm not sure if this can work, not even if it is legal to decompile classes from another program

    regards.
    Lucas Franceschi


    (UPD: typo--> i'm not sur if it'll work = i'm not sure if it'll work)
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    reply
      Bookmark Topic Watch Topic
    • New Topic