2

Possible Duplicate:
How can I extract java exe to jar

Is there a way to convert exe to jar file? for example i have an exe file that was written with java first, then i convert to jar file then exe file. Can i convert it back to jar file? I understand that java programs can be made into an exe and there are tools to convert jar files to exe but is it possible to convert back? I searched many sites but couldn't come up with the answer yet. Is it impossible or not? Does any one know a program to covert EXE files to JAR files, I know there are a lot to do the opposite.

Community
  • 1
  • 1
legrotalie
  • 21
  • 1
  • 1
  • 2

2 Answers2

3

You cannot "convert" it, you can try to extract the JAR file which is inside, but:

  1. some Java-to-EXE packagers don't actually embed JAR files into EXE files, but for example they embed .class files or use other techniques;
  2. some Java-to-EXE packagers try to 'protect' the intellectual property of the developer by making it difficult to recover the JAR and/or the .class files.
  3. some Java-to-EXE compilers do actually compile the code into an executable. So no luck.

I'd start using an EXE Resource Inspector, like Resource Hacker. I have to inform you that extracting resouces from an executable you didn't create yourself may be illegal, depending on the license it is released with.

gd1
  • 11,300
  • 7
  • 49
  • 88
2

Conversion of jar to exe is highly implementation dependent and so is the reverse conversion procedure.

Edit: This question has been answered here: How can I extract java exe to jar

Community
  • 1
  • 1
Jagat
  • 1,392
  • 2
  • 15
  • 25