Results 1 to 13 of 13
- 03-17-2008, 09:14 AM #1
Member
- Join Date
- Mar 2008
- Posts
- 3
- Rep Power
- 0
- 03-17-2008, 12:04 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
First of all, welcome to Java Forum community.
Yes you can. Used winrar and extract your jar file. You can get collection of class files.
If you want to take Java files, use a decompiler to do it.
By the way, why do you want to do this.... :)
Eranga.
- 03-17-2008, 01:21 PM #3
Member
- Join Date
- Mar 2008
- Posts
- 3
- Rep Power
- 0
thank you for your cooperation
- 03-19-2008, 06:59 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Is that work? Did you get Java files using decompiler?
- 03-19-2008, 02:01 PM #5
Member
- Join Date
- Mar 2008
- Posts
- 3
- Rep Power
- 0
go to command prompt
Now check with src.jar file which is by default present in all jdks
After doing this you can able to see folder with same name as jar
file and navigate through folder you can able to see list of .java and .class files. Simillarly you can derive lot of .class and .java from jar.
c:\>cd jdk1.6\bin
c:\jdk1.6\bin> jar -xvf src.jar
or use Winrar or winzip software to extract .java and .class file from .jar file
- 03-21-2008, 09:54 AM #6
Member
- Join Date
- Mar 2008
- Posts
- 3
- Rep Power
- 0
yes it works. thank you very much again :) i'm beginner so i understand step by step.
- 10-05-2012, 08:34 PM #7
Member
- Join Date
- Oct 2012
- Posts
- 4
- Rep Power
- 0
Re: converting jar to .class or .java
hello guys,
i am just started working in java,
i had a question how can we extract the .class files from jar file ?....
can any one explain it in detail !....
- 10-05-2012, 08:36 PM #8
Member
- Join Date
- Oct 2012
- Posts
- 4
- Rep Power
- 0
Re: converting jar to .class or .java
hello guys,
i am just started working in java,
i had a question how can we extract the .java files from jar file ?....
can any one explain it in detail !....
- 10-05-2012, 08:37 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,400
- Blog Entries
- 7
- Rep Power
- 17
Re: converting jar to .class or .java
When people rob a bank they get a penalty; when banks rob people they get a bonus.
- 10-05-2012, 09:21 PM #10
Member
- Join Date
- Oct 2012
- Posts
- 4
- Rep Power
- 0
Re: converting jar to .class or .java
hello eranga ,
i first extracted the jar file i got bunch of class files with help of winrar , but i want java files.
classe files are generated by compiler ?..
what should i have to do for .java files?....
- 10-05-2012, 10:29 PM #11
Arma virumque cano
- Join Date
- Oct 2012
- Location
- Indianapolis
- Posts
- 20
- Rep Power
- 0
Re: converting jar to .class or .java
1. You write java code in a .java file. These files are referred to as the "Source Code".
2. The java compiler javac compiles it into a class. These aren't readable in a text editor.
3. The class files get packed into a .jar file for distribution. These .jar files are either executable
or they are library packages. They can be unjarred with the same file that jarred it (jar.exe)
or another decompressor.
4. In order to change a .class file back into a .java file, you need to decompile it. This is the opposite
of compiling it(see step 2)
I have never used a java decompiler before. But here is an example: JD-Eclipse | Java Decompiler
This is a plugin for the Eclipse IDE.
- 10-06-2012, 02:17 AM #12
Re: converting jar to .class or .java
Why don't you ask the author for the source?
Do you have the author's permission to reverse engineer his work?
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 10-06-2012, 10:49 PM #13
Member
- Join Date
- Oct 2012
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Converting an Array to a Vector
By Java Tip in forum java.langReplies: 0Last Post: 04-14-2008, 08:44 PM -
Converting URL to URI
By Java Tip in forum Java TipReplies: 0Last Post: 12-26-2007, 10:15 AM -
Converting String to Double
By srini in forum New To JavaReplies: 1Last Post: 12-24-2007, 08:03 PM -
Converting text file(.txt) to JPG file(.jpg) in java
By javadeveloper in forum Advanced JavaReplies: 0Last Post: 11-09-2007, 04:22 PM -
help with converting to JApplet
By Simmy in forum AWT / SwingReplies: 2Last Post: 08-09-2007, 08:45 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks