Is it possible to decompile .exe files to Java using Jbuilder2007?

  • Java
  • Thread starter jaredmt
  • Start date
  • Tags
    Java
In summary, you cannot decompile .exe files to read the code in Java. You would need a java decompiler to do that.
  • #1
jaredmt
121
0
I have Jbuilder2007 and I am wondering if there is a way i can decompile .exe files so i can read the code in java.
 
Technology news on Phys.org
  • #2
What you need is a java decompiler, and there are some available:

http://members.fortunecity.com/neshkov/dj.html
 
Last edited by a moderator:
  • #3
Well, Java is not normally compiled to an .exe, it's usually compiled to a .class. The class files contain JVM bytecode and can be decompiled into Java source.

If you're trying to decompile a Java program that has been compiled all the way to an .exe (using JET, for example), you're out of luck.

- Warren
 
  • #4
ok, so basically there is no way to edit a .exe file? i thought maybe there was a way the code could be translated to java or pseudocode or something
 
  • #5
jaredmt said:
ok, so basically there is no way to edit a .exe file? i thought maybe there was a way the code could be translated to java or pseudocode or something

To edit an exe file, you'd need to use a disassembler and know the assembly language.

There are various ways in which an exe can be moved into something higher than assembly, but they're usually either:
* Really hard to do, and not much easier to read than the assembly; or
* Total cheats, and exactly as hard to follow as the assembly.
 
  • #6
You can use a disassembler to help you decode the machine-level instructions, but that's about it. AFAIK, there is currently no way to reliably and automatically reverse-engineer machine code to a high-level language; it's a much more complex problem than you might think.
 
  • #7
dwahler said:
AFAIK, there is currently no way to reliably and automatically reverse-engineer machine code to a high-level language; it's a much more complex problem than you might think.

Yep. You can imagine storing the executable in an array, dereferencing, and jumping to that point -- any strong enough language (C/C++ not FORTRAN or Java, though C# could do it in unsafe mode) should be able to do that, but it's hardly understandable. Likewise, you could imagine turning a few commands into basic C commands and leaving the rest in asm blocks -- but that's no better either.

A sufficiently unstructured language could probably be a target for the disassembled code, but it would be nearly impossible to read -- all GOTOs and weird pointer math.
 

1. Can any .exe file be decompiled to Java?

No, not all .exe files can be decompiled to Java. Only .exe files that were originally written in Java and then compiled to .exe can be decompiled back to Java.

2. Is decompiling an .exe file to Java legal?

It depends on the circumstances. If the .exe file is a proprietary software and the decompilation is done without the permission of the owner, it may be considered illegal. However, if the .exe file is open source or the owner gives permission, then it is typically considered legal.

3. What tools are needed to decompile an .exe file to Java?

There are various tools available for decompiling .exe files to Java, such as JD-GUI, JAD, and DJ Java Decompiler. These tools can be downloaded and installed for free from the internet.

4. Can the decompiled Java code be recompiled into a working .exe file?

Yes, it is possible to recompile the decompiled Java code back into a .exe file. However, the resulting .exe file may not work exactly the same as the original one, as some information may have been lost during the decompilation process.

5. Are there any limitations to decompiling an .exe file to Java?

Yes, there are some limitations to decompiling an .exe file to Java. Depending on the complexity of the code and the tools used, the decompiled Java code may not be an exact replica of the original code. Additionally, some code may be obfuscated, making it difficult or impossible to decompile back to Java.

Similar threads

  • Programming and Computer Science
Replies
2
Views
606
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
Replies
25
Views
2K
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
2
Replies
39
Views
5K
  • Programming and Computer Science
2
Replies
57
Views
3K
Back
Top