Convert .class files into .java files???

Does anybody know how to convert x.class file back to a x.java file. Or in other terms, extract .java files from a jarfile??
Thanks for any help
/carlos

Does anybody know how to convert x.class file back to a x.java file.As Dr.Clap said, that's decompiling.
Or in other terms, extract .java files from a jarfile??That isn't quite the same thing. You can decompile a .class that's in a jar, but a .class file doesn't have to be in a jar and a file in a jar isn't necessarily a .class.

Similar Messages

  • How to convert .class files to .java files

    Hi,
    I want to convert .class files to .java files. Is there is any software for that doing except Dj DCompiler? Because if i am using this i am not getting proper code i mean as it is available in the file.
    I tried by writing simple java file and i compiled Sample.java file and i got a .class file then i converted this Sample.class to Sample.java file by using DjDcompiler but i was missing some statements i need entire code that is available in Sample.java file. Please tell me any other software for that doing.
    Thank you in advance

    I want to convert .class files to .java files.
    iles. Is there is any software for that doing except
    Dj DCompiler? Because if i am using this i am nothttp://www.google.com/search?hl=en&q=java+decompiler&meta=
    getting proper code i mean as it is available in the
    file.I doubt you ever will.
    I tried by writing simple java file and i compiled
    Sample.java file and i got a .class file then i
    converted this Sample.class to Sample.java file by
    using DjDcompiler but i was missing some statements i
    need entire code that is available in Sample.java
    file. Please tell me any other software for that
    doing.Did you hear about "compiler opimizations"?

  • Error while converting class file to exp and jca file

    error while converting *.class file to *.exp and *.jca file
    =====================================================================================================================
    linux-y60u:/home/admin/java_card_kit-2_2_1/samples/src # converter -exportpath "/home/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/HelloWorld 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/HelloWorld.class
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/Identity.class
    error: com.sun.javacard.samples.HelloWorld.HelloWorld: unsupported class file format of version 50.0.
    error: com.sun.javacard.samples.HelloWorld.Identity: unsupported class file format of version 50.0.
    conversion completed with 2 errors and 0 warnings.
    =====================================================================================================================

    i compile a file javacard use this command:
    ===
    javac -source 1.3 -target 1.1 -g -classpath ./classes:../lib/api.jar:../lib/installer.jar src/com/sun/javacard/samples/Identity/Identity.java
    ===
    and try to convert this class use this command
    ===
    /home/xnuxerx/admin/java_card_kit-2_2_1/bin/converter -exportpath "/home/xnuxerx/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/Identity 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    ===
    result convert:
    ===
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/xnuxerx/admin/java_card_kit-2_2_1/samples/classes/com/sun/javacard/samples/Identity/Identity.class
    converting com.sun.javacard.samples.Identity.Identity
    error: export file framework.exp of package javacard.framework not found.
    conversion completed with 1 errors and 0 warnings.
    ===
    why ??
    please your comment for this problem.
    thank 4 all.

  • How to convert .class file to exec file...

    hi.
    how to convert .class file to exec file...
    please explain me clearly.....
    thanks...

    Placing your exact "question" into google:
    http://www.google.com/search?q=how+to+convert+.class+file+to+exec+file...

  • Converting .class file to .dll file

    Hi
    Can any body tell me what is the procedure for converting .class file to .dll(windows) file.
    Thanks,
    latif

    One way, You could produce a DLL that wraps the JVM and loads your java class exposing a C and/or C++ callable interface, but that is a lot to go through.
    Otherwise, if you are thinking of using Java class for .net applications you can
    use IKVM.NET to convert Java class to .NET dll. For this you can refer to:
    http://www.ikvm.net/userguide/tutorial.html

  • Converting oracle forms into java forms

    Hi all,,
    would help me plz on how to convert oracle forms into java using any tool;
    Is Jheadstart is the tool,, im having jeveloper version 10.1.2.1.0

    There are at least two companies that are marketing Forms to Java conversion tools. I'm sure that a good Google search will locate them, and they are frequent exhibitors at Oracle-oriented conferences like Collaborate and ODTUG Kaleidoscope. But there are problems associated with doing this. I urge anyone who is considering such a project to read this article by Grant Ronald: http://www.oracle.com/technology/products/forms/pdf/10gR2/formsmigration.pdf
    You should carefully ask yourself and your clients and management, "Why do you want to do this?", "What benefits are you trying to realize?", "Does this make sense, and are there other options that we should be exploring?"
    For instance, many people are trying to protect themselves because "Forms is going away". Oracle has stated again and again that Forms is NOT going away. In fact the recent Fusion Middleware 11g release included a new version of Forms with some significant enhancements. You may do very well just by upgrading to the latest version of Forms.
    If you do decide that it still makes sense to convert, I suggest that rather that converting, you may want to redevelop from scratch. Keep the database if it is well designed - a well designed, stable database will outlast any front end that you may use against it. Then take full advantage of the capabilities of your new toolset, and leave behind the limitations and inapplicable methodologies of your old one. Oh, by the way, don't use JDeveloper 10.1.2. Use 11g if you can, or 10.1.3.5 if you must.

  • Convert Oracle Forms into Java (swing & JSP's)

    Dear All,
    We are currently in the process of evaluating our upgrade of system, which is using forms 4.5. One of the options we are considering at this stage is converting all forms into Java program. I am currently doing some pilot work on this project. I am using FormsWizard, a product of InformatikAtelier Gmbh, along with Forms 6i and Jdeveloper 9i. Has any one done this before in this group? Your assistance is much appreciated.
    Regards
    Michael Sesuraj.
    Oracle 8i Certified Database Administrator
    Sun Certified Java 2 Programmer

    Grant, Thanks for that mail. It was very useful article. The article has lots of brilliant points consider. I may have to discuss with our System Architect. With my experience in both forms and Java, it is hard to justify the business benefit out of this conversion. We are a strong Oracle house and have no intention of moving towards J2EE at this stage.. Thanks once again.
    Michael Sesuraj
    Oracle 8i Certified Database Administrator
    Sun Certified Java 2 Programmer

  • How to convert class files into java files??

    Hey Guys,
    I need a little help.
    I want to know wheather we can view .class files as .java files or convert the .class to .java files.Is ther any tool or software for doing that.
    Or in other words can i see the source code of any .class file..??
    Plz do tell me if we can do that or any other way we can do that.
    Regds,
    Gokul

    Sort of. A "decompiler" will take a class file and generate a source code file of source code that could be compiled to get the class file you started out with. However, it won't be the same source code that was originally used to create the class. Most notably, comments will be missing, and variable names will probably be meaningless.
    And before you say "java is bad because you can decompile it", note that any language that you can execute you can theoretically decompile.
    Also, you can view the raw byte codes. If you're familiar with assembly language, or better yet familar with java bytecodes and the JVM in particular, you can often find out what a particular method does just by viewing the byte codes.

  • Converting class files into java source codes

    Dear Friends,
    It is true that conversion of class files to its java source codes is possible through some software. I want to know, is there any way to protect my java source codes from viewing or copying illegally by other persons ?
    If I create JAR file from java files, can it be also convertible back to source codes ?
    Avi

    You can use code obfuscators in order to protect your code. And yes a jar file can also be decompiled.
    http://www.retrologic.com/
    http://www.2lkit.com/products/2LKitObf/
    http://www.codingart.com/codeshield.html
    http://www.drjava.de/obfuscator/

  • How to convert class file to Java source code ?

    Hi All ,
    Currently am working in Peoplesoft Demo project using java as Plug in.We have only the class files and jar files and we have planned to modify the code for future enhancements.We dont have any legal issues here as we are already working with our client for the original source code.
    Kindly help me out in doing this reverse engineering process.We have come to know the below steps would help us out.Can someone guide us in acheiving this process step by step.Please add your experience here and let us know what are the other steps required ..
    (1)Rename the file from .jar to .zip and extract the .zip file.
    (2)Decompile the desired .class file using 3rd party tool and get .java file.
    (3)Modify the .java file and compile it.
    (4)Now zip the extracted files and rename the it from .zip to .jar.
    We need to verify whether the modified .jar file will work
    Thanks & Regards
    Kar1983

    Thanks for your reply ....We have asked them so many times ..but they say they dont have it .Since we have planned to do some enhancements from our end we have planned to do reverse engineering process.

  • How to convert class file into exe

    I have made a simple calculator using swing.now i want it to be used as an application from the desktop..How can i do it?..any suggestions?

    raghu0007 wrote:
    I have converted the class file to jar using jar cvf simplecalci.jar simplecalci.class.
    Now i don't know wat to do next since when i double click the jar.....windows shows the message
    Failed to load Main-class manifest attribute from c:\users\raghu\simplecalculator\build\classes\simplecalculator\simplecalci.jar
    I am using netbeans and i have JRE 5 as well as JRE 6 installed.
    I don't knw wat to do.Netbeans creates the .jar file for you,
    Simply right click on the project node in nb and select
    clean and buildnext goto the location of the project
    Eg:
    C:\Documents and Settings\raghu0007\My Documents\NetBeans Projects\SimpleCalculcator\dist\There will usually be 2 files in there, 1 for the Gui parts and the other(.jar) the rest.
    These two files must always be together (same directory for the jar file to work)
    copy the dist folder to C:\Program Files\, Rename it and create a shortcut to the simplecalci.jar file
    If you know the above just take a look at how you modified the MANAFEST file and the file(MF,class...) locations in the .jar
    For Windows XP
    Edited by: gtRpr on 2008/06/20 09:48

  • Converting .class file

    Hi all,
    i have a doubt regarding, How to convert a .class file into a .java file without using any tools.

    If you look at the java spec there is a chapter on class file structure.
    One warning however. D'ya ever see 'Batman Returns'? You know the part where the penguin reassembles all those documents with sticky tape - that's the kind of area you are in here.
    Tools will make you life so much simpler. Try jad, lovely. Or even javap -c, you don't get javacode, but the bytecode is reasonably easy to understand.

  • How to convert class file

    Hi all, I am new in java card development.
    This is my environment setting:
    @echo off
    set JC_HOME=C:\JavaCard\java_card_kit-2_2
    set JAVA_HOME=C:\j2sdk14103
    set PATH=.;%JC_HOME%\bin;%PATH%
    I have created the Wallet applet according to 'Zhiqun Chen" text book and named it WalletApp.java.
    I have compiled this file to a class file.
    This is where is I saved my file
    C:\JavaCard\java_card_kit-2_2\samples\src\com\sun\javacard\samples\WalletApp\WalletApp.java.
    But I don't really understand how to convert the class file.
    May I know what is this for?
    -out EXP JCA CAP
    -exportpath
    -applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1
    com.sun.javacard.samples.HelloWorld.HelloWorld
    com.sun.javacard.samples.HelloWorld
    0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
    must save this in what file?
    I tried to type in the command line below (and the result):
    C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sap
    les\Wallet\Wallet.opt
    error: file scr\com\sun\javacard\saples\Wallet\Wallet.opt could not be found
    Usage: converter <options> package_name package_aid major_version.minor_ver
    sion
    OR
    converter -config <filename>
    use file for all options and parameters to converter
    Where options include:
    -classdir <the root directory of the class hierarchy>
    set the root directory where the Converter
    will look for classes
    -i support the 32-bit integer type
    -exportpath <list of directories>
    list the root directories where the Converter
    will look for export files
    -exportmap use the token mapping from the pre-defined export
    file of the package being converted. The converter
    will look for the export file in the exportpath
    -applet <AID class_name>
    set the applet AID and the class that defines the
    install method for the applet
    -d <the root directory for output>
    -out [CAP] [EXP] [JCA]
    tell the Converter to output the CAP file,
    and/or the JCA file, and/or the export file
    -V, -version print the Converter version string
    -v, -verbose enable verbose output
    -help print out this message
    -nowarn instruct the Converter to not report warning messages
    -mask indicate this package is for mask, so restrictions on
    native methods are relaxed
    -debug enable generation of debugging information
    -nobanner suppress all standard output messages
    -noverify turn off verification. Verification is default
    *********************************************************May I know What is the correct command line to convert the class file and what must I do to before converting the class file?
    I saw some article saying we must use JDK1.3, is it a must?
    Your solution is highly appreciated.
    Thank you!

    Hi Ricardo,
    I saved the file below as WalletApp.opt in the directory of scr\com\sun\javacard\samples\WalletApp
    -out EXP JCA CAP
    -exportpath c:\javacard\java_card_kit-2_2\api_export_files
    -applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2:0x1 WalletApp.WalletApp
    WalletApp 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2 1.0
    But I still have the problem below:
    C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sam
    ples\WalletApp\WalletApp.opt
    error: file scr\com\sun\javacard\samples\WalletApp\WalletApp.opt could not be fo
    und
    Usage: converter <options> package_name package_aid major_version.minor_ver
    sion
    OR
    converter -config <filename>
    May I know What's wrong with my command or file?
    Where can I download JDK because what I can find is J2SDK.
    Thank you!

  • How to convert .class file to .dll file

    hi,
    I got a problem, I have to convert my java .class file to .dll file. Microsoft VC++ program will invoke the converted .dll file.
    Is there any other possibility.
    I was confused.
    Cam any body help me. If you are having solution for the can you send to my [email protected] account.
    thanks,

    No, it is not possible to do what you are suggesting. Yes, you could produce a DLL that wraps the JVM and loads your java class exposing a C and/or C++ callable interface, but that is a lot to go through unless your class is VERY complex. Otherwise, you might want to just create and maintain two implementations.

  • Converting CPP code into JAVA Code

    i have made a cpp file that is running fine... is ther a tool which can convert that cpp file into java file easily?

    No

Maybe you are looking for

  • Removing Non-Breaking Spaces En Masse

    A bunch of text I copied into a pages document is littered with lots and lots of non-breaking spaces (^ with a dot underneath it, showing up as an invisible). Does anyone know of a way to select the affected text and convert the non-breaking spaces i

  • Create task template from workflow?

    Hi, I have a requirement where I need to create a task template (report) for the organization admin when the organization is created. Thus my question is, is it possible to create a report from the workflow? I have to create the report of type user s

  • Retake only wrong answers in Quiz?

    Hi, I have Captivate 4, and was  wondering if you can set the quiz to retake only the failed questions. I have a 40 random question  quiz, with a pool of around 60 questions, and want the learner to  retake the questions they answered wrong only, not

  • Got charged $80 for a game I never bought

    I got charged $80 for one of those games with in-app purchases. I never bought this game (I'm the one who has access to my laptop and iPod), so it wasn't a mistake from someone else. I don't even have that game installed on the iPod or in iTunes. The

  • My Macbook Pro (2008) won't turn on. No backlight, only still white light on opening button.

    So my MacBook Pro (2008) wont turn on, it's battery usually lasts around 30 minutes - 1 hour when fully charged. I turned it off last night, running fine. This morning I came to turn it on and there was no response other than the white light on the o