Decompile a jar file

i have a jar file, how can i decompile it?

alin19 wrote:
i have a jar file, how can i decompile it?A jar cannot be decompiled. A jar file is just a (simle) container that can be opened by (most) archive managers (WinZIP and the likes). In that jar file, there are .class files which can be decompiled: Google for "class decompile" and you will find tens of thousands of hits.

Similar Messages

  • Decompiling jar file and then run

    Dear Members,
    I have a jar file and I have decompiled that jar file and converted into class file,
    now I want to run/edit using source code ,I am unable to run source code with out put whatever coming in jar file running,
    I am trying with class in which
    public static void main(String[] args)
    function defined,
    I am using Jcreater1.5 and from command prompt also running but unable to run and edit the programm,
    how to run these class file in complete project that output will come as running jar file
    regards
    SACHIN

    It sounds like you have unpacked the jar.
    To edit the source you need to decompile the classes to .java files.
    [http://www.google.co.uk/search?q=java+decompiler]

  • Error after deompiling JAR file

    Dear Everyone,
    I decompile a JAR file and re-save the java files.
    After that I use the Wireless Toolkit to recompile the same files back.
    BUT the java files always gave me 100 errors when I compile them.
    I have successfully compiled some JAR files before.
    Is there any idea what should I do?

    Is there any idea what should I do?Yes, stop decompiling and stealing code.

  • Help please - Updating .jar file and can't compile decompiled .java files.

    Ok, so there is a game on the internet called 'runescape', its a java applet that runs in the web browser from a cache in the windows directory.
    Basically im trying to edit this client so that i can run it away from their website (for use on a private server).
    The problem i am getting is that when i decompile the class files from the .jar into the .java files i can't recompile the .java files.
    E.G. I decompiled one of the .class files and tried to re-compile it agian straight away which brought me errors, i did this to rule out my editing as the problem.
    The jar file can be found [here.|http://world80.runescape.com/loader_gl397188536.jar] but the link will no double be dead after a few weeks.
    Can somebody please take a look and help me? I'm fairly new to java programming so if you could keep your answers as simple as possible that would be great, thanks.
    Ps. If this is the wrong section im sorry, i couldn't find the right section and this section seemed closest for me.

    i'm compiling using the javac command in a batch file, its displaying 100 errors but there are more, it seems to be showing that the syntax is incorrect as it is labeling brackets as being in the incorrect places.
    Decompiling error?
    As for being allowed to do this, im not so sure the company would approve but im only doing this for learning purposes and will not be releasing any of it upon the internet.

  • How to step thru the code in jar file.

    I am trying to step through the code in the jar file. My code is a Java stored procedure which uses a jar file. Whenever I try to Trace into the code residing in the jar file I am always hitting the
    JDeveloper API Decompiler STUB SOURCE generated from class file.
    I tried to set up the Class path and Source path in the Project Options but it didn't help.
    Any help is appreciated.
    Thanks.

    If are trying to debug the Java Stored Procedure deployed in Oracle8i (816), then you should be using Remote Debugging feature in JDeveloper 3.1
    check out http://technet.oracle.com/products/jdev/info/jdev/rdjsproc/s000.html http://technetinside.us.oracle.com/products/jdev/info/rdebugwp/rdebugwp.html
    raghu

  • Updating a jar file

    I am using the following ant file in eclipse to build jar files when I ask the project to be built
    <project name="atg" default="create-jar">
        <target name="create-jar">
            <jar jarfile="${jarlocation}/classesDAS.jar">
                <fileset dir="WebContent/WEB-INF/classes" includes="**/*.class"/>
                <fileset dir="WebContent/WEB-INF/classes" includes="**/*.properties"/>
            </jar>
        </target>
    </project>Is there a possibility that I modify this file to rather update jar files rather than creating new ones??????

    Something did occur to me.... If you use update, then
    presumably Ant works by taking newer/modified files
    that have timestamps after the modified time of the
    Jar... IF you were to move things around to other
    packages, or directories for non-class files, in your
    development process, then you could end up with
    duplicate items in different locations in the Jar,
    which could lead to hard to find bugs later if you
    forgot to update the paths elsewhere, or end up
    updating the wrong files. So IMO, it's safer all
    around to just let it create a new Jar so that it's
    always clean.Thanx all of you for taking out some time to advise me. I really appreciate that. The reason I am more interested in update is because of the situation I am trapped in. We are using a third party API to talk to the oracle database. Though I personally would prefer using JDBC myself but here I have no choice as its a decision made at much higher levels. Now there are advantages with this API that it maintains a cache and you donot have to do SQL queries all the time, but I was having problem since a few days as it would not always provide me with the right results. Since I was the one assigned to look into it I decided to decompile some of the classes and put them into a project in WSAD/Eclipse. Now there are thousands of classes in this jar file and I donot want to decompile all of them and add them to the project what I was wondering was to add this ant script to the project file add some debug statements and hopfully it would change only the files I want it to rather than creating a new jar file with just 10 files rather than all of them. This was the background of my question. So what do u suggest now. I donot want to do jar -uvf after moving class files everytime I compile thats why I wanted to use ant.

  • Protecting the jar files from being web access

    I have a jnlp file which is put under tomcat webapps folder, say (\webapps\TEST\launch.jnlp), with the jar and lib files put in the subfolder (\webapps\TEST\folder1\*.jar AND \webapps\TEST\folder1\lib\*.jar).
    My question is how can i prevent user from direct access to the jar files via typing http://www.someip.com/TEST/folder1/main.jar ? I tried the following methods but it seemed not working:
    1. Change the folder permisson in \webapps\TEST\*.*, but when user type the above hyperlink they can still get the jar file
    2. put the jar and related files under \WEB-INF\, but now this time running the launch.jnlp, it returns an error saying that it can't access/find the WEB-INF.
    Is there any method? Or should I say, when you published jnlp to web, the related jar files are forced to be accessed by everyone.

    Sounds easy to me: encrypt your xml, then instead of just storing your key as plain bytes do some reversable operations on it (xor masks, reversions, whatever you like), just do them in many different points (and classes) of your code, have some parts done by methods that actually check application is running under JWS with proper codebase, scramble it all, and suddently the whole stealing operation won't be worth the effort. Obviously you should have many private (and package protected) methods, seal packages and so on. Maybe, somehow, you can even use reflection to identify calling classes (not sure, never looked for anything similar).
    What else? write down some c++ code into your own dll/JNI library and make it do something too, so they'll even need to decompile the dll. If you know first execution is always online you can send another xor key and store it with persistence service or write it down to windows registry. You can keep making it harder as much as you like, even just with silly code like
    Math.ceil((new GregorianCalendar.getField(Calendar.YEAR)%2000)/1000)*((int)('c'-'a'))just to retrieve the number 2. If you distribute such code through many lines and methods, once you scramble it, most people will give up.
    Bye.

  • How to ban extracting from .jar file?

    Hello
    Problem of .jar file is: .class files can be extracted (with winrar ...) and decompiled. I don't want my classes to be decompiled. But I still need my jar executable of course.
    Is some solution which bans extraction without any impact on executability?
    Thank you very much.
    Tony

    Is some solution which bans extraction without any
    impact on executability?Hmmmm you could not put any class files in your jar. That would eliminate the extraction problem. Probably would be detrimental to execution.
    What do you think happens when your app runs? It just magically knows about your classes without extracting them?
    Not so much no.
    Use an obfuscator.
    Or if that's not good enough use another language or just panic.

  • Editing a JAR file?

    Hi,
    I need some insights on how to edit a .jar file using an IDE such as Eclipse. Could someone help me out?
    Thanks!
    Epithemeus

    Epithemeus wrote:
    The trouble though is that I received some compiled code (as a .jar file). The code uses paths to several files - I need to modify these paths for the code to be able to find my files locally.That might be tricky.
    First problem is that you'll need to decompile and re-compile the source which might or might not work without any problems (jad is a halfway passable decompiler).
    The next problem is that it might not be allowed to modify the .jar file at all, but that depends heavily on the laws of your location.
    Any suggestions?Best solution based on correctness and reducing your workload: get the vendor of the .jar file to fix the problem (either make the paths configurable or at least make it use relative paths).

  • UnJar a .JAR file

    Hello!
    Im tring to unjar a .JAR file to view its sourcecode. Is this possible and if it is how do i do it?
    Thanks

    You can open it with e.g. winzip another program like that and you can unzip it. Then you will probably get .class files. You will need a decompiler to get the source code of the .class files.

  • Protecting your jar file from been extracted

    Please i noticed that the java jar file of a software can easily be extracted to review the class files with winrar which allows just anyone to have access to your class file and decompile to get source codes, allowing pirating of the software. How can I lock the jar file to prevent extraction of my class files.

    1. why are you mocking others instead of answering the question ? some one wants to protect his jar file. the solution is simple.
    2. you can use google to search, here is result :
    http://stackoverflow.com/questions/1280702/protecting-java-jar-files-for-distribution
    http://stackoverflow.com/questions/9633455/how-to-protect-a-jar-file-from-being-decompiled
    http://www.thegeekstuff.com/2008/06/protect-your-java-code-from-reverse-engineering/
    http://answers.google.com/answers/threadview/id/431511.html
    http://stackoverflow.com/questions/1879061/how-to-protect-java-codes-against-decompiler
    http://viralpatel.net/blogs/2009/07/protect-java-code-decompilation-using-java-obfuscator.html
    http://www.coderanch.com/t/430716/java/java/Protect-class-file-not-decompile
    http://stackoverflow.com/questions/7324708/are-jar-file-insecure-what-can-done-apart-from-code-obfuscation
    http://stackoverflow.com/questions/3647255/how-do-i-copy-protect-my-java-application
    http://www.javaworld.com/javaworld/javatips/jw-javatip22.html
    http://stackoverflow.com/questions/12088/do-you-obfuscate-your-commercial-java-code
    3. it is true if you can use basic methods that EJP mentioned, there would be no need for obfuscators, nor native library use.
    but there are many situations that you can't do any of those methods.
    4. EJP claims that he probably is the one "who have had perhaps 40 times as long as you've had to think about it."
    here is the problem that made me use both obfuscation and native library :
    My company released a simple java library that scanned a document (directly from scanner or camera device).
    the documents were exam papers.
    Use some OCR techniques to convert image to text so some other application could calculate the score using it's api.
    For marketing purposes, the company needed to publish a 7-day trial version of this library.
    So, as you can see I'm eager to hear what you want to suggest.

  • Jar files with digital signature -pl help

    Hi there
    is there anybody who will help me guiding step by step how to create a jar file (executable) with digital signature?
    thanks in advance.

    Sorry, digital signatures have nothing to do with decompilation security. The short answer is, there's nothing you can do about it. Search the forum for 'obfuscator', a lot of people have asked the same question.
    -Ron

  • Extract jar file

    how do i expand/extract a .jar file so i can read all the classes and figure out how the program works?

    Open it with winzip/winrar. Extract all the class files. Run a Java decompiler on them.
    If you weren't able to figure this out though, you're probably not going to understand the decompiled code.

  • Reengeneering JAR-Files?

    To what extend is it possible to get information about algorithms and data structures out of an jar-file, i.e. out of the *.class - files of an application?
    Is there some method to protect a jar-file against this?

    To what extend is it possible to get information about
    algorithms and data structures out of an jar-file,
    i.e. out of the *.class - files of an application?You would be amazed how similar to the original source the decompiled class files are, download one and check it out! http://directory.google.com/Top/Computers/Programming/Languages/Java/Development_Tools/Translators/Decompilers_and_Disassemblers/?tc=1
    Is there some method to protect a jar-file against
    this?Yes! it is called obfuscation, there are some pretty good freeware ones out there: http://directory.google.com/Top/Computers/Programming/Languages/Java/Development_Tools/Obfuscators/?tc=1

  • Jar file doesn't execute correctly

    I have created a jar file both manually and using Eclipse. I seem to run into the same strange issue however.
    When I run the jar file from the command line, it executes some of the code, however, it doesn't seem to run any code in one of my classes. The program doesn't fail, however, and doesn't give me any exception.
    When I extracted the .class files in the .jar, my class is there. The decompiled code is also the same as I had written. When I execute the class file in the command prompt, everything works fine.
    Has anyone seen anything like this before?

    if you have problem to make a jar and you dosent understund what to do i have made a special program for you. in the beginning it was just for myself byt you lookslike you chould need it. www.tiinusen.hello.to/download/ just download jar converter there is a explanation/readme when you zip it up.

Maybe you are looking for

  • How to give a value an Hyper link attribute

    Hi, I am pulling some data from the database and displaying on a report. One of the feilds in that report is the DATA. How can I give Hyperlink to that data value and then when I click on that DATA one of the SQL or PL/SQL script needs to be triggere

  • Responsibilities in Rules

    Hi, I would like to maintain the rule crm_dno_1. I insert an agent assignment (organizational unit). All business partners from ppoma_crm are assigned but the names are not shown. Any ideas why the names are not shown? Regards Bjoern

  • Creating color-based links in Flash

    I have an image with seven distinct colors.  I would like for each color to be linked to a separate html page if clicked.  Can flash link to a page based on the color of the area clicked?  If so, how?  If not, any ideas on a workaround? Thanks!

  • Will there be a winXP downgrade option for t410

    Hi will there be a downgrade option to winXP 32bit for the t410 + win7 64bit? How long do you provide winXP 32bit driver? How do the downgrade work? Do you offer t410 + winXP pro 32bit? Do the t400 battery fit in the t410? Do the t410 have a secend b

  • System Reebot Problem

    I am having major problems with my system and have been advised that the only way to solve them is to uninstall xp and re-install it again. Does anyone know if I will lose my i-Tunes library when I do this, including any purchased music from the i-Tu