/. Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press 'Run' button to execute it. JCavaj Java Decompiler is a free and useful Java-based Java Decompiler You can decompile java applets, jar and zip files producing accurate java source code. JCavaj runs on any platform with Java. JDec - Java Decompiler Online Click to select a file, or drag and drop it here (.class or.jar).
- Decompile Java Class File Online
- Decompile Java Appleton
- Decompile Java Exe
- Java Class File Decompiler
Greenhorn
posted 9 years agohi everybody
can .class file decompiled into .java file and then after important modification and then after compilation be used as original?
thanks
Bartender
posted 9 years agoFirstly am not sure if the decompiled version will be exactly same as that of the original file. Moreover, if you have a valid java file with all imports resolved, you can as well edit that file and compile it again. And for decompiling details- you can search in the Beginner or Java General forums.
This is somewhat not encouraged because you would be making use of some else's work. If the code is open sourced then you can download the source directly and this is fine because the original author wanted it to be shared and reused.
Mohamed Sanaulla | My Blog | Author of Java 9 Cookbook | Java 11 Cookbook
Greenhorn
posted 9 years agothanks
may i know what are free decompiler available.
is there decompiler plugine available there?
Ranch Hand
posted 9 years ago
Ranch Hand
posted 9 years ago
Greenhorn
posted 9 years agothanks
is decompile code(.class->.java) 100% reliable as original one
Ranch Hand
posted 9 years agoAFAIK there's no guaranty for a 100% success. I wouldn't rely on it.
Greenhorn
posted 9 years agoMehmet Gunacti wrote:AFAIK there's no guaranty for a 100% success. I wouldn't rely on it.
sir thanks
i have a .class file.
original source file missed.
i have to change url in this file
how one can do it?
please tell me sir a successfull way
Ranch Hand
posted 9 years agowell, create an empty project in your favorite IDE and put the original jar file into the build-path.
decompile the class, put the .java file into your source folder (preserve package structure).
after compilation just update the original jar file using Winrar, drag and drop the new class file and overwrite the original one.
That should do the trick ;)
Bartender
posted 9 years agoThere is no reliable way to do this. Your decompiled java classes may well.. not compile because the decompilation process is not fool proof.
You can however follow the approach mentioned by Mehmet. It will bring you closest to success.
Why are you decompiling anyway ? Did you lose the source ?
SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Bartender
posted 9 years agoIt might be a good idea to carefully read the license. Some licenses explicitly forbid decompiling.
[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Ranch Hand
posted 9 years agoWhy don't you just use Eclipse IDE to open .class file? Eclipse has everything you need for the project..harness the tool to it full power.
OCPJP6-05-11
'Your life is in your hands, to make of it what you choose.'
Ranch Hand
posted 9 years agowell mr pandy may be completely innocent, but i always thought one of the big advantages of compilers vs interpreters is that your source code is sate.
Sheriff
posted 9 years agoSafe? No. You can do your best to make it hard to decompile, by using a code obfuscator, but in the end most of the code can be decompiled. After all, the JVM needs to be able to read the byte code, and therefore so can any decompiler.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask QuestionsHow To Answer Questions
Ranch Hand
posted 9 years agothe question is, why did the designers of Java allow that ?
they must have discussed this, and accepted the fact that Java code will be decompilable.
Shouldn't they have included an option (parameter maybe ?) that would prevent decompilation ?
Bartender
posted 9 years agoMehmet Gunacti wrote:the question is, why did the designers of Java allow that ?
they must have discussed this, and accepted the fact that Java code will be decompilable.
Shouldn't they have included an option (parameter maybe ?) that would prevent decompilation ?
The JLS and the class format are specifications. This means your specification can have a JVM vendor (Sun/IBM/JBOSS) and it allows for freedom. You need not be tied down with a vendor.
SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks Wajah tum ho 2016 hindi movie.
Marshal
Decompile Java Class File Online
posted 9 years agoDesign your own monogram free. Mehmet Gunacti wrote:. . . an option (parameter maybe ?) that would prevent decompilation ?
As Rob has already told us, if you can execute the bytecode you can decompile it. So it is not possible to prevent decompilation.
Ranch Hand
posted 9 years agoCampbell Ritchie wrote:
Mehmet Gunacti wrote:. . . an option (parameter maybe ?) that would prevent decompilation ?
As Rob has already told us, if you can execute the bytecode you can decompile it. So it is not possible to prevent decompilation.
You mean, if you can interpret the code, you can decompile it.
Still, there should be a mechanism like, compiling the java source code to binary instead of bytecode. the JVM should then be able to run binary-bytecode..
ok, I was just thinking loud.
AFAIK one is able to decompile .net code (intermediate language ?), too, right ? So I guess MS would have prevented that, if there would be a way to do it.
Bartender
posted 9 years ago run binary-bytecode..
Assembly you mean ? Here are some links that can clarify the matter for you
Decompile Java Appleton
http://en.wikipedia.org/wiki/Bytecode
http://en.wikipedia.org/wiki/Assembly_language
http://en.wikipedia.org/wiki/Just-in-time_compilation
SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Ranch Hand
posted 9 years agoDeepak Bala wrote:
run binary-bytecode..
Assembly you mean ? Here are some links that can clarify the matter for you
Was just wondering why they didn't come up with a method to prevent decompiling Java classes.
It's not possible, I guess, that's why.
Yes, I meant assembly (or machine code). sorry for the inappropriate term.
Thanks for the links.
Decompile Java Exe
Marshal
posted 9 years agoCompiling to machine code would tie your application to a particular platform. You would have to recompile a Windows® application to run on a Mac, for example.
Greenhorn
posted 9 years agoJava Class File Decompiler
I haven't had cause to look into it, but there are Java Obfuscators that will attempt to amend your class files to prevent/make decompilation difficult. If that's something that concerns you.