Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: How do you convert a jar file into a java file, how ?

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How do you convert a jar file into a java file, how ?

    how do you convert a jar file into a java file ?

    I am new to Java ,but have a little experience in C++ and Visual Basic.

    I want to edit and maybe create my own mobile games that are written or converted into jar files.

    At the moment I am using Java NetBeans , and Easy Java( the java pad).

    However the only solution I tried was to open the JAR file in winrar and see that its made up of png picture files,
    midi music files and class files. Unfortunately when I uncompressed the JAR file , there was NO java file to be seen and the JAVA editors Do not show the class file like a Java file. So why is there no extension Java file in the mobile JAR game ?


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: How do you convert a jar file into a java file, how ?

    I'm not quite sure I understand you...

    Jar files are basically Java zip files, which can contain embedded run commands for running a Java application.

    Java files are the source files which can be edited using any text editor. These are in turn compiled down to .class files which contain the bytecode to be run by the JVM. You can "disassemble" these .class files, but it's very likely you won't get back anything that's terribly useful and it will probably require considerable knowledge to reverse engineer the source.

  3. #3
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: How do you convert a jar file into a java file, how ?

    Reverse engineering a downloaded jar is almost always disallowed by license. Also, the simple fact that you expected to find source files in a jar archive suggest that you need to go through much more fundamental tutorials before taking up game programming.

    Here's a good starting point: The Java™ Tutorials

    db

  4. #4
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: How do you convert a jar file into a java file, how ?


  5. #5
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: How do you convert a jar file into a java file, how ?

    Also
    convert a jar file into a java file, how ?

    db

Similar Threads

  1. Replies: 10
    Last Post: January 12th, 2011, 05:48 AM
  2. insert(embed) a file object (.txt file) in MS excel sheet using java.
    By jyoti.dce in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 12th, 2010, 08:16 AM
  3. [SOLVED] Convert JFrame graphics into a jpeg file
    By Perd1t1on in forum AWT / Java Swing
    Replies: 4
    Last Post: June 22nd, 2010, 05:21 PM
  4. How to Convert DWG File to an Image
    By lance9200 in forum Java Theory & Questions
    Replies: 0
    Last Post: June 17th, 2010, 10:21 AM
  5. How to change File Type of a File Using java
    By akash169 in forum File I/O & Other I/O Streams
    Replies: 8
    Last Post: March 31st, 2010, 02:58 AM